Partager via


XXX_Close (Device Manager) (Windows Embedded CE 6.0)

1/6/2010

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

Stream Interface Driver Functions
ActivateDeviceEx
XXX_Open (Device Manager)
XXX_PreClose (Device Manager)
XXX_PreDeinit (Device Manager)

Concepts

Device File Names

Other Resources

CloseHandle