|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| kernel32.lib
| Header File
| winbase.h
| Unicode
| No
| Platform Notes
| None
|
|
|
GetCurrentThread
The GetCurrentThread function returns a pseudohandle for the current thread.
HANDLE GetCurrentThread(VOID)
Parameters
This function has no parameters.
Return Values
The return value is a pseudohandle for the current thread.
Remarks
A pseudohandle is a special constant that is interpreted as the current thread
handle. The calling thread can use this handle to specify itself whenever a
thread handle is required. Pseudohandles are not inherited by child processes.
This handle has the maximum possible access to the thread object. For systems
that support security descriptors, this is the maximum access allowed by the
security descriptor for the calling process. For systems that do not support
security descriptors, this is THREAD_ALL_ACCESS.
The function cannot be used by one thread to create a handle that can be used
by other threads to refer to the first thread. The handle is always interpreted
as referring to the thread that is using it. A thread can create a "real"
handle of itself that can be used by other threads, or inherited by other
processes, by specifying the pseudohandle as the source handle in a call to the DuplicateHandle function.
The pseudohandle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect. If the pseudohandle is duplicated by DuplicateHandle, the duplicate handle must be closed.
See Also
CloseHandle, DuplicateHandle, GetCurrentProcess, GetCurrentThreadId
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|