View Single Post
Re: CreateRemoteThread - Strange behaviour
Old
  (#3)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: CreateRemoteThread - Strange behaviour - 19-09-2004

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


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)

Last edited by koraX; 19-09-2004 at 22:41..
  
Reply With Quote