Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NT Gurus and Setting Priority From Visual Foxpro
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00252651
Message ID:
00254834
Views:
35
>>Just a quick question for those of us who are Internet challenged. In VFP 6.0 SP3 we have the _VFP.ThreadID property. Do you have any idea why this value doesn't match that which GetCurrentThread() returns. GetCurrentThreadID() returns the same value, but as I understand it, GetCurrentThread() returns a pseudo-handle to the thread. I guess what I'm asking is why would the pseudo-handle work where the real one wouldn't?
>
>The Thread ID is kind of like the ProcessID - it's something you can use to
>retrieve a real handle to the thread. The ID is something you'll see in
>a debugger and something you can store with your application. The handle
>is the actual physical aspect that controls the thread or process.
>
>IDs are sequentially numbered and easy to read. Handles are large numbers
>that the system generates uniquely.
>
>Standard Windows API fare I guess...

Just to amplify things, a process or thread id is global - it is valid regardless of the process running. The process handle and thread handle are local to the process holding the handle - it's not valid outside the process that gets it.

>
>+++ Rick ---
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform