Rediger

Del via


IWiaImageFilter::InitializeFilter method

Initializes the filter. Called by Windows Image Acquisition (WIA) 2.0 before each image download.

Syntax

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

Parameters

pWiaItem2 [in]

Type: IWiaItem2*

Specifies a pointer to the IWiaItem2 item that represents the preview image.

pWiaTransferCallback [in]

Type: IWiaTransferCallback*

Specifies a pointer to the application's IWiaTransferCallback interface.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method is called when an application calls Download and when an application calls the WIA 2.0 Preview Component's GetNewPreview function. IWiaImageFilter::InitializeFilter stores the references to pWiaItem2 and pWiaTransferCallback to pass into these functions. These two interface pointers should be stored as member variables and IUnknown::AddRef should be called for each. The interface pointers are also needed in the filter's implementation of TransferCallback and GetNextStream during image acquisition.

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