Compartir a través de


XXX_Close (Device Manager) (Windows CE 5.0)

Send Feedback

This function closes a device context created by the hOpenContext parameter.

BOOLXXX_Close(DWORD hOpenContext);

Parameters

  • hOpenContext
    [in] Handle returned by the XXX_Open (Device Manager) function, which is used to identify the open context of the device.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

An application calls the CloseHandle function to stop using a stream interface driver. The hFile parameter specifies the handle associated with the device context. In response to CloseHandle, the operating system invokes XXX_Close.

The file handle specified for hOpenContext is no longer valid after this function returns; if an application tries to perform stream I/O operations on that handle after calling CloseHandle, those operations fail.

Device Manager uses the XXX prefix. When implementing the stream interface, replace XXX with a prefix appropriate for your implementation or use undecorated entry point names in conjunction with DEVFLAGS_NAKEDENTRIES. For more information about other valid Flags values, see ActivateDeviceEx.

If you have threads blocked in your driver, resources associated with the handle or device instance might not be able to be released. To avoid this, implement the XXX_PreClose (Device Manager) and XXX_PreDeinit (Device Manager) entry points.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Developer implemented.
Link Library: Developer implemented.

See Also

Device File Names | ActivateDeviceEx | CloseHandle | XXX_Open (Device Manager) | XXX_PreClose (Device Manager) | XXX_PreDeinit (Device Manager)

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.