CeCloseHandle
This function closes an open object handle. CeCloseHandle is a RAPI that enables an application that is running on a desktop computer to make function calls on a Microsoft® Windows® CE–based device.
STDAPI_(BOOL) CeCloseHandle(
HANDLE hObject
);
Parameters
- hObject
Handle to an open object.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call CeGetLastError.
Remarks
The CeCloseHandle function closes handles to the following objects.
Communications device | Mutex |
---|---|
Database | Process |
Event | Socket |
File | Thread |
CeCloseHandle invalidates the specified object handle, decrements the object's handle count, and performs object retention checks. After the last handle to an object is closed, the object is removed from the system.
Closing a thread handle does not terminate the associated thread. To remove a thread object, you must terminate the thread, and then close all handles to the thread.
Use CeCloseHandle to close handles returned by calls to the CeCreateFile function. Use CeFindClose to close handles returned by calls to the CeFindFirstFile function.
Requirements
Pocket PC Platforms: Pocket PC 2000 and later
OS Versions: Windows CE 3.0 and later
Header: rapi.h
Library: rapi.lib
See Also
Send feedback on this topic to the authors.
© 2005 Microsoft Corporation. All rights reserved.