Provide an IStiUSD interface
WIA builds on STI. In order to ensure the integration of a WIA minidriver with STI, the minidriver must implement an interface derived from the IStiUSD interface methods. This interface must be present in a WIA minidriver. The IStiUSD interface is used for managing devices (such as loading a driver), and is the means by which the IStiDevice interface methods communicates with still image devices. A minidriver must fully implement an interface derived from the IStiUSD::Initialize method in order to be loaded by the WIA service.
Typically, IStiUSD interface methods are called by similarly named methods defined by the IStiDevice interface. Minidrivers typically implement IStiUSD interface methods by calling the appropriate kernel-mode driver. Each minidriver must define all interface methods, but if a method is not needed it can simply return STIERR_UNSUPPORTED.
See the wiacam camera sample minidriver file, IStiUSD.cpp, for an example of how a minidriver implements the IStiUSD interface.
The following table lists and describes all of the methods defined by the IStiUSD interface. Methods that must be implemented or conditionally implemented by WIA minidrivers are identified.
Method | Description |
---|---|
IStiUSD::DeviceReset | Resets a still image device to a known initialized state. |
IStiUSD::Diagnostic | Runs diagnostic tests on a still image device. A WIA minidriver must implement this method. |
IStiUSD::Escape | Performs a vendor-specific I/O operation on a still image device. |
IStiUSD::GetCapabilities | Returns a still image device's capabilities. |
IStiUSD::GetLastErrorInfo | Returns information about the last known error associated with a still image device. |
IStiUSD::GetNotificationData | Returns a description of the most recent event that occurred on a still image device. |
IStiUSD::GetStatus | Returns the status of a still image device. A WIA minidriver must implement this method if its device has objects, such as buttons, that can generate events. |
IStiUSD::Initialize | Initializes an instance of the COM object that defines the IStiUSD interface. A WIA minidriver must implement this method. |
IStiUSD::LockDevice | Locks a device for exclusive use by the caller. A WIA minidriver must implement this method. |
IStiUSD::RawReadCommand | Reads command information from a still image device. |
IStiUSD::RawReadData | Reads data from a still image device. |
IStiUSD::RawWriteCommand | Writes command information to a still image device. |
IStiUSD::RawWriteData | Writes data to a still image device. |
IStiUSD::SetNotificationHandle | Specifies an event handle that the minidriver should use to inform the caller of device events. A WIA minidriver must implement this method if its device has objects, such as buttons, that can generate events. |
IStiUSD::UnLockDevice | Closes the device port. A WIA minidriver must implement this method. |