   Runtime error when using LoadLibrary
  Hi,I'm trying to create dll for my software, and when I try to dynamically link ddls using LoadLibrary function, my software always gives me a runtime error, but do NOT crashes.The runtime error is: R6034When I call GetLastError() to get the last error code, it always gives me: 1114.I'm using VS 2005 to build my dlls and project.Does anyone knows how to fix this?Thanks,Steve   
Win32 Error Codes1114 A dynamic link library (DLL) initialization routine failed. ERROR_DLL_INIT_FAILEDDo you have a proper entry point defined in your dll?   ;Quote:Original post by DrEvilWin32 Error Codes1114 A dynamic link library (DLL) initialization routine failed. ERROR_DLL_INIT_FAILEDDo you have a proper entry point defined in your dll?How can I define one in VS 2005?Sorry, Im new to DLLs.Thanks for your help,Steve   ;Quote:Original post by SteveRodrigueHow can I define one?DllMain.   ;Quote:Original post by raz0rQuote:Original post by SteveRodrigueHow can I define one?DllMain.Yea, I tried that but it didnt work either.Thanks,Steve   ;  Put a breakpoint on your DllMain and step through it, to see why its failing.   ;The docs.R6034.  Somewhat more understandable version of the error.