CloseHandle
CloseHandle closes an open object handle.
Syntax
BOOL CloseHandle(
[in] HANDLE hObject
);
Parameters
[in] hObject
An open object handle.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code if the function fails.
Remarks
CloseHandle closes handles to thread and file objects. It invalidates the specified object handle, decreases the object's handle count, and performs object-retention checks. Once the last handle to an object is closed, the object is removed from the operating system.
Note: In the RTSS environment, CloseHandle can only close RTSS objects. In the Windows environment, CloseHandle can only close Windows objects. Use RtCloseHandle to close RTSS objects in the Windows environment.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
windows.h |
wRTOS_rtss.lib |
See Also: