Muokkaa

Jaa


Reading Device Metadata

WIA minidrivers for web services scanners must read the following device metadata properties at run time:

PKEY_PNPX_ServiceId This property is needed to initialize the WIA_DPS_SERVICE_ID WIA property.

PKEY_PNPX_GlobalIdentity This property initializes the WIA_DPS_GLOBAL_IDENTITY WIA property.

PKEY_PNPX_ID This property initializes the WIA_DPS_DEVICE_ID device property.

Note

Accessed directly or indirectly by using IStiDeviceControl::GetMyDevicePortName

The minidrivers might also read other properties, including the following:

PKEY_PNPX_FIRMWARE_VERSION This property initializes the WIA_DPA_FIRMWARE_VERSION WIA property.

Note

Minidrivers that use WSDScan.sys can also retrieve the PNPX ID value by calling IStiDeviceControl::GetMyDevicePortName; the returned device path is the current PKEY_PNPX_ID.

For a description of these PKEY_PNPX_Xxx properties, see the PNP-X Implementer's Guide (DOC download).

The following code examples show how to open a Property Store for the current Function Instance object that is obtained as described in the previous section and how to read device properties from the store:

Code Example for Opening a Property Store

Code Example for Reading Device Properties

Code Example for Initializing Device Properties