Re: Where is my DLL?
- Posted by "Juergen Luethje" <j.lue at gmx.de> Oct 15, 2005
- 567 views
Me wrote: <snip> > Somewhere on the internet I read: >| If you want to find the path for a DLL, pass the DLLs instance handle, >| which you can obtain from the first parameter in your DLL's DLLMain() >| function. > > Of course in Euphoria there is no DLLMain() function. > When I pass the result of Euphoria's instance() function as the module > handle parameter, GetModuleFileName() also returns the path of the EXE > file instead the path of the DLL. <snip> Now I looked at the C code produced by the translator. In main_.c it reads: <C code> int __declspec (dllexport) __stdcall DllMain(int hDLL, int Reason, void *Reserved) { if (Reason == 1) EuInit(); return 1; } </C code> Maybe it's possible to manually add some C code that fetches the value of 'hDLL', so that I can use it in my Euphoria code? The problem is that I know almost nothing about C. Can someone tell me how to do so? Regards, Juergen -- Have you read a good program lately?