Re: DLL trouble
- Posted by mic _ <stabmaster_ at HOTMAIL.COM> Oct 23, 2000
- 536 views
>This time i'm losing my mind trying to compile my >DLL that i'm writing in C so that i can use the >functions in it in Euphoria > You'll need this: BOOL WINAPI LibMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: return TRUE; break; case DLL_PROCESS_DETACH: break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } return TRUE; } plus, you usually need to supply a definition-file (*.def). This file should look like this: EXPORTS func_1 func_2 ... func_n (where func_1..n are the functions you wish to make linkable). You include this file on the commandline when you link your program. You may also have to declare those functions as _dllexport (or something like that). it's not needed with msvc though. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.