Posted: Thu Oct 07, 2010 7:27 pm Post subject: FreeLibraryAndExitThread - ExitCode, wtf is this?
I'm trying to eject a loaded DLL using FreeLibraryAndExitThread API but I don't understand what the ExitCode parameter is supposed to be. The MSDN isn't very descriptive on this part. _________________
The exit code is a user defined value. When a thread exits, it is possible to retrieve the exit code by calling GetExitCodeThread(), and from there do handling. _________________
In most languages you typically return 0 or EXIT_SUCCESS to indicate success and 1 or EXIT_FAILURE to indicate failure. In fact usually any non-zero return indicates failure. As sponge said it is also common to use a user defined value. So returning a number other than 0 indicates something in particular. It can be used similar to how error codes are used in Get/SetLastError()
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum