Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


FreeLibraryAndExitThread - ExitCode, wtf is this?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
False Prophet
Expert Cheater
Reputation: -1

Joined: 28 May 2006
Posts: 121

PostPosted: Thu Oct 07, 2010 7:27 pm    Post subject: FreeLibraryAndExitThread - ExitCode, wtf is this? Reply with quote

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.
_________________
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Thu Oct 07, 2010 9:36 pm    Post subject: Reply with quote

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.
_________________
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Oct 08, 2010 5:19 am    Post subject: Reply with quote

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()
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites