|
-
October 27th, 2010, 02:50 PM
#5
Re: Sending handle out of bool callback
 Originally Posted by lucastonon
This callback function is called when I press a button, but I wanted to pass the handle out of it to use it in another button or something else, and use openprocess out of it. How?
What is "EnumWindowsProcb"?
If you mean "EnumWindowsProc", then that's what the second parameter to EnumWindowsProc is for.
http://msdn.microsoft.com/en-us/libr...=VS.85%29.aspx
Code:
HANDLE myHandle = NULL;
EnumWindows(whatever, (LPARAM)&myHandle);
//....
Code:
static BOOL CALLBACK EnumWindowsProcb(HWND hwnd, LPARAM lParam)
{
//...
HANDLE *pHandle = (HANDLE*)lParam;
*pHandle = hProcess;
....
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|