Collapse the table of content
Expand the table of content

IWiaDataTransfer::idtGetBandedData method

The IWiaDataTransfer::idtGetBandedData method transfers a band of data from a hardware device to an application. For efficiency, applications retrieve data from Windows Image Acquisition (WIA) hardware devices in successive bands.


HRESULT idtGetBandedData(
  [in, unique] PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,
  [in, unique] IWiaDataCallback        *pIWiaDataCallback


pWiaDataTransInfo [in]


Pointer to the WIA_DATA_TRANSFER_INFO structure.

pIWiaDataCallback [in]

Type: IWiaDataCallback*

Pointer to the IWiaDataCallback interface. Periodically, this method will call the BandedDataCallback method to provide the application with data transfer status notification.

Return value


This method can return any one of the following values:

Return ValueMeaning
E_INVALIDARGOne or more parameters to this method contain invalid data.
E_OUTOFMEMORYThis method cannot allocate enough memory to complete its operation.
E_UNEXPECTEDAn unknown error occurred.
S_FALSEThe application canceled the operation.
S_OKThe image was successfully acquired.
STG_E_MEDIUMFULLThe storage medium the application is using to acquire the image is full.
WIA_S_NO_DEVICE_AVAILABLEThere are no WIA hardware devices attached to the user's computer.


This method will return a value specified in Error Codes, or a standard COM error if it fails for any reason other than those specified in the preceding table.


The IWiaDataTransfer::idtGetBandedData method allocates a section of memory to transfer data without requiring an extra data copy through the Component Object Model/Remote Procedure Call (COM/RPC) marshalling layer. This memory section is shared between the application and the hardware device's item tree.

Optionally, the application can pass in a pointer to a block of memory that IWiaDataTransfer::idtGetBandedData will use as its shared section. The application passes this handle by storing the pointer in the ulSection member of the WIA_DATA_TRANSFER_INFO structure prior to calling IWiaDataTransfer::idtGetBandedData.

Applications can improve performance by using double buffering. To do this, applications must set the bDoubleBuffer member of the WIA_DATA_TRANSFER_INFO structure to TRUE. The IWiaDataTransfer::idtGetBandedData method will divide the data buffer in half. When one half of the buffer is full, IWiaDataTransfer::idtGetBandedData will send a notification to the application using the IWiaDataCallback pointer passed in through the pIWiaDataCallback parameter. While the application is retrieving the data from the full half of the buffer, the device driver can fill the other half with data.

The format of the data transfer is determined by the values of the item's WIA_IPA_FORMAT and WIA_IPA_TYMED properties. The application sets these properties with calls to the IWiaPropertyStorage::WriteMultiple method.


Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]









© 2016 Microsoft