Partager via


CeCloseHandle (RAPI) (Windows CE 5.0)

Send Feedback

This function closes an open object handle.

CeCloseHandle is a remote application programming interface (RAPI), which enables an application running on a desktop computer to make function calls on a Windows CE–based device.

BOOLCeCloseHandle( HANDLEhObject);

Parameters

  • hObject
    [in] 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
  • Database
  • Event
  • File
  • Mutex
  • Process
  • Socket
  • 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, 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

OS Versions: Windows CE 1.0 and later.
Header: Rapi.h.
Link Library: Rapi.lib.

See Also

RAPI Functions | CeCreateFile | CeDeleteFile | CeFindClose | CeFindFirstFile | CeGetLastError

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.