Sign in to follow this  

Win32 - HANDLE

This topic is 4595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, could anyone give me an overview on how to use a win32 HANDLE or point me towards a good tutorial? I need to use this and the structure takes in a HANDLE for the event to be executed. I would like it to call a function or perhaps set a variable, but I'm not sure how to go about doing this.

Share this post


Link to post
Share on other sites
Quote:
Original post by SumDude
http://msdn.microsoft.com/library/en-us/sysinfo/base/about_handles_and_objects.asp?frame=true


I don't think this is what I'm looking for. It doesn't seem to be about HANDLEs, but rather some other sort of "handle" if that makes any sense. Doesn't explain much either way.

Share this post


Link to post
Share on other sites
Short answer: a HANDLE is an index into the process' handle table, which is basically a table of pointers to kernel mode objects (files, etc.). They don't really have any meaning in user mode (which is where your code will be running). You just pass them to the appropriate functions that go into kernel mode.

I should note that not all HANDLEs are like this. Some "HANDLE"s are just user mode pointers that are masked by typecasting to a HANDLE. Either way, you should not be messing around with them. Just treat them as what they are - handles.

Share this post


Link to post
Share on other sites

This topic is 4595 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this