Microsoft KB Archive/90470

{|
 * width="100%"|

Getting Real Handle to Thread/Process Requires Two Calls

 * }

Q90470

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * the operating system: Microsoft Windows NT, versions 3.1, 3.5, 3.51
 * Microsoft Windows 95

-

The API GetCurrentThread returns a pseudo-handle rather than the real handle to the thread. To get the real handle to the thread, you need to use DuplicateHandle using the pseudo-handle that is returned from GetCurrentThread. In addition, to get the real handle to a process, you need to call DuplicateHandle after calling GetCurrentProcess.

Additional query words: 3.10 3.50 4.00

Keywords : kbOSWinNT310 kbOSWinNT350 kbOSWinNT351 kbOSWin95

Issue type :

Technology : kbAudDeveloper kbWin32sSearch kbWin32API