IWiaErrorHandler::ReportStatus method

Handles status and error messages during image data transfers and displays them to the user.

Syntax

HRESULT ReportStatus(
  [in] HWND     hwndParent,
  [in] IUnknown *punkItem,
  [in] HRESULT  hrStatus,
  [in] LONG     cbResLength,
  [in] BYTE     *pbData
);

Parameters

hwndParent [in]

Type: HWND

HWND that is the parent window for the message window.

punkItem [in]

Type: IUnknown*

Pointer to the IUnknown interface of the item being transferred. This object minimally implements IWiaItem2 and IWiaDataTransfer.

hrStatus [in]

Type: HRESULT

HRESULT that is the status code received by BandedDataCallback.

cbResLength [in]

Type: LONG

LONG that is the size of the data referred to by pbData.

pbData [in]

Type: BYTE*

Pointer to the data buffer as received by BandedDataCallback.

Return value

Type: HRESULT

Returns hrStatus if the error cannot be recovered from. Otherwise, it returns one of the following values.

Return code Description
S_OK
The appropriate action was taken to correct the error and the transfer can continue.
S_FALSE
No action was taken to handle the error or report status to the user.
E_ABORT
The user chose to abort the transfer in response to the displayed dialog box.

 

Remarks

Windows Image Acquisition (WIA) 2.0 calls IWiaErrorHandler::ReportStatus when the driver sends an IT_MSG_DEVICE_STATUS message to BandedDataCallback. This method handles the message and displays information to the user about the status or error. If the message is about an error, the method lets the user choose, if possible, whether to try to recover from the error and continue the transfer or to abort.

hrStatus is set to WIA_STATUS_TRANSFER_BEGIN to inform the handler a transfer has started. It is set to WIA_STATUS_TRANSFER_END when the transfer is complete.

If hrStatus is SEVERITY_SUCCESS, the user should be allowed to cancel the transfer.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Wia.h
IDL
Wia.idl
Library
Wiaguid.lib