Applies to: desktop apps only
Retrieves certain properties of an object handle.
Syntax
BOOL WINAPI GetHandleInformation(
__in HANDLE hObject,
__out LPDWORD lpdwFlags
);
Parameters
- hObject [in]
-
A handle to an object whose information is to be retrieved.
You can specify a handle to one of the following types of objects: access token, console input buffer, console screen buffer, event, file, file mapping, job, mailslot, mutex, pipe, printer, process, registry key, semaphore, serial communication device, socket, thread, or waitable timer.
- lpdwFlags [out]
-
A pointer to a variable that receives a set of bit flags that specify properties of the object handle or 0. The following values are defined.
| Value | Meaning |
- HANDLE_FLAG_INHERIT
- 0x00000001
|
If this flag is set, a child process created with the bInheritHandles parameter of
CreateProcess set to TRUE will inherit the object handle.
|
- HANDLE_FLAG_PROTECT_FROM_CLOSE
- 0x00000002
|
If this flag is set, calling the
CloseHandle function will not close the object handle.
|
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
Requirements
|
Minimum supported client
| Windows 2000 Professional |
|
Minimum supported server
| Windows 2000 Server |
|
Header
|
- Winbase.h (include Windows.h)
|
|
Library
|
- Kernel32.lib
|
|
DLL
|
- Kernel32.dll
|
See also
-
CloseHandle
-
CreateProcess
-
Handle and
Object Functions
-
SetHandleInformation
Send comments about this topic to Microsoft
Build date: 3/6/2012