Just a few notes, maybe it will help :
- perform only simple tasks in dllmain(). DO NOT load/free other libraries in dllmain().
(I know in most bots they call freelibrary to free game DLL file from dllmain(), but it is not good
) See
here for more info.
Quote:
The entry-point function should perform only simple initialization or termination tasks. It must not call the LoadLibrary or LoadLibraryEx function (or a function that calls these functions), because this may create dependency loops in the DLL load order. This can result in a DLL being used before the system has executed its initialization code. Similarly, the entry-point function must not call the FreeLibrary function (or a function that calls FreeLibrary), because this can result in a DLL being used after the system has executed its termination code.
|
-
http://weblogs.asp.net/oldnewthing/a.../27/63401.aspx
-
http://weblogs.asp.net/oldnewthing/a.../28/63880.aspx