Compartir a través de


Stream Interface Driver Functions (Compact 2013)

3/26/2014

The following table shows the stream interface driver functions with a description of the purpose of each.

Device Manager uses the XXX prefix. When implementing a stream interface driver, replace XXX with a prefix appropriate for your specific implementation. Alternatively, you can use undecorated entry point names in conjunction with DEVFLAGS_NAKEDENTRIES.

Programming element

Description

XXX_Cancel (Device Manager)

This function cancels all pending asynchronous I/O requests for the specified device.

XXX_Close (Device Manager)

This function closes the device context identified by hOpenContext.

This function is required to access the device with CreateFile. If you implement XXX_Close, you must implement XXX_Open.

XXX_Deinit (Device Manager)

This function de-initializes a device. It is called by Device Manager.

This function is required by drivers loaded by ActivateDeviceEx or ActivateDevice.

XXX_Init (Device Manager)

This function initializes a device. It is called by Device Manager.

This function is required by drivers loaded by ActivateDeviceEx or ActivateDevice.

XXX_IOControl (Device Manager)

This function sends a command to a device.

This function might or might not be required, depending on the device capabilities that the driver exposes. This function requires an implementation of XXX_Open and XXX_Close.

XXX_Open (Device Manager)

This function opens a device for reading, writing, or both. An application indirectly invokes this function when it calls CreateFile to obtain a handle to a device.

This function is required to access the device with CreateFile.

XXX_PowerDown (Device Manager)

Optional. This function ends power to the device. It is useful only with devices that can be shut off under software control.

XXX_PowerUp (Device Manager)

Optional. This function restores power to a device.

XXX_PreClose (Device Manager)

Optional. This function marks the closing handle as invalid and wakes any sleeping threads.

XXX_PreDeinit (Device Manager)

This function marks the device instance as invalid and wakes sleeping threads.

This function is required if the XXX_PreClose function is implemented.

XXX_Read (Device Manager)

This function reads data from the device identified by the open context.

This function might or might not be required, depending on the device capabilities that the driver exposes.

This function requires an implementation of XXX_Open and XXX_Close.

XXX_Seek (Device Manager)

This function moves the data pointer in the device.

This function might or might not be required, depending on the device capabilities that the driver exposes.

This function requires an implementation of XXX_Open and XXX_Close.

XXX_Write (Device Manager)

This function writes data to the device.

This function might or might not be required, depending on the device capabilities that the driver exposes.

This function requires an implementation of XXX_Open and XXX_Close.

See Also

Reference

Stream Interface Driver Reference