Stream Interface Driver Functions (Windows CE 5.0)
The following table shows the stream interface driver functions with a description of the purpose of each.
Programming element | Description |
---|---|
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, ActivateDevice, or RegisterDevice. |
XXX_Init (Device Manager) | This function initializes a device. It is called by Device Manager.
This function is required by drivers loaded by ActivateDeviceEx, ActivateDevice, or RegisterDevice. |
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. |
Send Feedback on this topic to the authors