IWiaImageFilter::InitializeFilter method (wia_lh.h)

The IWiaImageFilter::InitializeFilter method stores the references to pWiaItem2 and pWiaTransferCallback parameters passed into the method.

Syntax

HRESULT InitializeFilter(
  [in] IWiaItem2            *pWiaItem2,
  [in] IWiaTransferCallback *pWiaTransferCallback
);

Parameters

[in] pWiaItem2

Points to the IWiaItem2 item that the image acquisition was initiated for by the application. In the case of IWiaTransfer::Download, it is the WIA item from which we obtained the IWiaTransfer interface, and in the case of the Preview component, it is the item that we pass into the IWiaPreview::GetNewPreview method.

[in] pWiaTransferCallback

Points to a IWiaTransferCallback interface. The IWiaTransferCallback interface is the application's callback interface, which is passed to IWiaTransfer::Download and IWiaPreview::GetNewPreview.

Return value

Returns S_OK on success, or a standard COM error code on failure.

Remarks

This method is called by the COM proxy object before the download call reaches the WIA service. This happens in two cases: when an application calls IWiaTransfer::Download method and when an application calls the IWiaPreview::GetNewPreview method.

All that IWiaImageFilter::InitializeFilter is required to do is to store the references to pWiaItem2 and pWiaTransferCallback that are passed into it. These interface pointers should be stored as member variables in this method and AddRef should be called for each interface pointer. These two interface pointers are needed in the filter's implementation of IWiaTransferCallback::TransferCallback and IWiaTransferCallback::GetNextStream methods.

This method cannot be invoked directly by the application.

Requirements

Requirement Value
Target Platform Desktop
Header wia_lh.h (include Wia_lh.h)

See also

IWiaImageFilter

IWiaItem2

IWiaPreview::GetNewPreview

IWiaTransferCallback

IWiaTransfer::Download