I need to call functions in the .NET assembly (dll) from an unmanaged application via winAPI calls (LoadLibrary...). I've found examples on how to modify the .IL code of an assembly so I can export the methods needed, but I have a following problem :
Everything works fine when I use __stdcall calling convention from an unmanaged app, but when I switch to __cdecl managed dll loads and executes only the first time??? Subsequent calls to the function result in a fatal error???
Please, help :)
Thanx
Daniel Petersson, Cefalo - 31 Jan 2005 11:19 GMT
Hi, I would recomend you to expose the managed functions
to win32 through mC++ instead of modifying the il code.
It is safer and less error prone. // daniel
> I need to call functions in the .NET assembly (dll) from an unmanaged application via winAPI calls (LoadLibrary...). I've found examples on how to modify the .IL code of an assembly so I can export the methods needed, but I have a following problem :
>
[quoted text clipped - 3 lines]
>
> Thanx