Platforms to show: All Mac Windows Linux Cross-Platform

Back to WIADataCallbackMBS class.

WIADataCallbackMBS.BandedDataCallback(message as Integer, Status as Integer, PercentComplete as Integer, Offset as Integer, Length as Integer, Buffer as memoryblock) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Image Capture MBS Win Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No
Provides data transfer status notifications.

Windows Image Acquisition (WIA) data transfer methods of the WiaDataTransfer interface periodically call this method.

Message: Specifies a constant that indicates the reason for the callback. Can be one of the kMessage* constants.
Status: Specifies a constant that indicates the status of the WIA device. Can be set to a combination of the kStatus* constants.
PercentComplete: Specifies the percentage of the total data that has been transferred so far.
Offset: Specifies an offset, in bytes, from the beginning of the buffer where the current band of data begins.
Length: Specifies the length, in bytes, of the current band of data.
Buffer: The data buffer.

Lasterror is set.

Your application must provide the BandedDataCallback event. This event is periodically invoked by the data transfer methods of the WiaDataTransferMBS interface. It provides status messages to the application during the data transfer. By returning false, your program can also use this method to prematurely terminate the data transfer.

When this method is invoked, the Message parameter will contain the reason for the call. Not all parameters will contain data on all calls. For example, when BandedDataCallback is invoked with a message of kMessageTermination, it should not attempt to use the values in the Buffer, Offset, and Length parameters.

If the value of Message is kMessageData, the buffer contains a band of image data. The Offset parameter contains an offset in bytes from the beginning of the buffer where the current band of data begins. The Length parameter specified the length in bytes of the current band of data.

During calls where Message is set to kMessageData or kMessageStatus, the Status parameter contains a valid value. Its contents should not be used when Message contains other values.

If Message is kMessageDataHeader, the Buffer parameter points to a WIA_DATA_CALLBACK_HEADER structure.

When an error has occurred during an image data transfer, the driver sets Message to IT_MSG_DEVICE_STATUS. The proxy callback object calls ReportStatus, which handles the error and displays messages to the user.

Some examples using this event:

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...