c# - Entry point not found with 32bits DLL. Working with 64 bits DLL -
our team developped c++ cuda dll , c# .net 4.5 hmi uses our dll.
these programs planed available 64bits platform.
recently our client inquire create our developpements available 32bits platform too.
we manage compile dll , hmi in 32bits.
so have 2 configurations :
hmi x64 uses cuda dll x64 hmi x86 uses cuda dll x86the 64bits configuration works perfectly.
the 32bits configuration has problems :
only exported functions available unvailable functions calls throw exception : entry point not found < name > in < dllname >exploring our 32 , 64bits dll dependency walker shows exported functions. (only mangled names alter between 32 & 64bits)
here prototypes of available exported functions :
extern "c" retourinit __declspec(dllexport) __stdcall initgpu(); extern "c" retour __declspec(dllexport) __stdcall setimagegpu(int idgpu, int nbimages, image * listeimages); extern "c" retour __declspec(dllexport) __stdcall getimagegpu(int idgpu, int nbimages, image * listeimages); extern "c" retour __declspec(dllexport) __stdcall duplicateimage(int idgpu, int nbimages, image * listeimages);
here prototypes of unavailable exported functions :
extern "c" retour __declspec(dllexport) __stdcall decoupe(int idcarte, decoupe paramdecoupe); extern "c" retour __declspec(dllexport) __stdcall fusion(int idcarte, fusion paramfusion);
if have solution propose or questions glad hear it.
thanks all.
the problem due passing fusion & decoupe structures not pointer.
we alter our prototypes :
extern "c" retour __declspec(dllexport) __stdcall decoupe(int idcarte, decoupe* paramdecoupe); extern "c" retour __declspec(dllexport) __stdcall fusion(int idcarte, fusion* paramfusion);
and adapt our dll code. our c# hmi hasn't changed.
this modification works in x86 & x64.
it's weird 64bits platform isn't impacted modification...
thanks comments.
c# c++ dll cuda 32bit-64bit
No comments:
Post a Comment