XXX_Close (Device Manager)
Other versions of this page are also available for the following:
8/28/2008
This function closes a device context created by the hOpenContext parameter.
Syntax
BOOL XXX_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 Value
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
Header | Developer Implemented |
Library | Developer Implemented |
Windows Embedded CE | Windows CE 1.0 and later |
See Also
Reference
ActivateDeviceEx
XXX_Open (Device Manager)
XXX_PreClose (Device Manager)
XXX_PreDeinit (Device Manager)