Export (0) Print
Expand All
2 out of 3 rated this helpful - Rate this topic

IFilter::Init method

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

Initializes a filtering session.

Syntax


HRESULT Init(
  [in]   ULONG grfFlags,
  [in]   ULONG cAttributes,
  [in]   const FULLPROPSPEC *aAttributes,
  [out]  ULONG *pFlags
);

Parameters

grfFlags [in]

Values from the IFILTER_INIT enumeration for controlling text standardization, property output, embedding scope, and IFilter access patterns.

cAttributes [in]

The size of the attributes array. When nonzero, cAttributes takes precedence over attributes specified in grfFlags. If no attribute flags are specified and cAttributes is zero, the default is given by the PSGUID_STORAGE storage property set, which contains the date and time of the last write to the file, size, and so on; and by the PID_STG_CONTENTS 'contents' property, which maps to the main contents of the file. For more information about properties and property sets, see Property Sets.

aAttributes [in]

Pointer to an array of FULLPROPSPEC structures for the requested properties. When cAttributes is nonzero, only the properties in aAttributes are returned.

pFlags [out]

Information about additional properties available to the caller; from the IFILTER_FLAGS enumeration.

Return value

This method can return one of these values.

Return codeDescription
S_OK

The operation was completed successfully.

E_FAIL

File to filter was not previously loaded.

E_INVALIDARG

Count and contents of attributes do not agree.

FILTER_E_PASSWORD

Access has been denied because of password protection or similar security measures.

FILTER_E_ACCESS

General access failures

 

Remarks

The Init method sets the state of the filter object. The content filter positions at the beginning of the object and the object state is frozen until the object is released. You can pass the filter object the set of properties you would like returned by setting up their property set and property identifier (ID) descriptions in the aAttributes array. For more information, see Filtering File Properties.

Notes to Callers

Call the Init method before calling all other IFilter methods.

Notes to Implementers

Chunk IDs must remain consistent across multiple calls to the Init method with the same parameters.

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

Requirements

Minimum supported client

Windows 2000 Professional (desktop apps only)

Minimum supported server

Windows 2000 Server (desktop apps only)

End of client support

Windows 7

End of server support

Windows Server 2008 R2

Header

Filter.h

See also

FULLPROPSPEC
IFilter
IFILTER_FLAGS
IFILTER_INIT

 

 

Build date: 9/10/2012

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.