IFilter::Init

Initializes the filtering session.

SCODE Init(
  ULONG grfFlags,     //Initialization settings from IFILTER_INIT
  ULONG cAttributes,  //Size of array of requested attributes
  FULLPROPSPEC const * aAttributes,
                      //Array requested attributes
  DWORD * pdwFlags    //Information on additional attributes
);
 

Parameters

grfFlags
[in] Flag settings from the enumeration IFILTER_INIT, for controlling text canonicalization, attribute output, embedding scope, and IFilter access patterns.
cAttributes
[in] The size of the attributes array. When non-zero, cAttributes takes precedence over attributes specified in grfFlags. If no attribute flags are specified and cAttributes is zero then PSGUID_STORAGE/PID_STG_CONTENTS is assumed. PSGUID_STORAGE is the storage property set, containing write time, size, etc., and PID_STG_CONTENTS is the 'contents' property, which maps to the main contents of the file.
aAttributes
[in] Array of requested attributes. When cAttributes is non-zero, only the attributes in aAttributes are returned.
pdwFlags
[out] Information about additional attributes available to the caller; from the IFILTER_FLAGS enumeration.

Return Values

FILTER_E_PASSWORD
Access has been denied because of password protection or similar security measures.
FILTER_E_ACCESS
General access failures.

Remarks

If the interface is successfully initialized, calls to other IFilter methods can be made. Once a successful call has been made to Init, the object must appear frozen from the point of view of the caller The object remains frozen until the filter object is released.

Multiple calls to Init reset the state of the filter object. The content filter is re-positioned to the beginning of the object and the object state is frozen. Chunk identifiers must remain consistent across multiple calls to Init with the same parameters

For some implementations of IFilter, it may not be possible (or it may be computationally expensive) to detect failure to access a document until Init has been called, or possibly even later.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in filter.h.

See Also

IFILTER_INIT