FilterInstanceFindNext function

The FilterInstanceFindNext function continues a minifilter driver instance search started by a call to FilterInstanceFindFirst.

Syntax


HRESULT FilterInstanceFindNext(
  _In_  HANDLE                     hFilterInstanceFind,
  _In_  INSTANCE_INFORMATION_CLASS dwInformationClass,
  _Out_ LPVOID                     lpBuffer,
  _In_  DWORD                      dwBufferSize,
  _Out_ LPDWORD                    lpBytesReturned
);

Parameters

hFilterInstanceFind [in]

Minifilter instance search handle returned by a previous call to FilterInstanceFindFirst.

dwInformationClass [in]

The type of instance information structure returned. This parameter must contain one of the following values.

ValueMeaning

InstanceBasicInformation

Return an INSTANCE_BASIC_INFORMATION structure for the instance.

InstanceFullInformation

Return an INSTANCE_FULL_INFORMATION structure for the instance.

InstancePartialInformation

Return an INSTANCE_PARTIAL_INFORMATION structure for the instance.

InstanceAggregateStandardInformation

Return an INSTANCE_AGGREGATE_STANDARD_INFORMATION structure for the instance. The LegacyFilter portion of the structure is not utilized. This structure is available starting with Windows Vista.

 

lpBuffer [out]

Pointer to a caller-allocated buffer that receives the requested information. The type of the information returned in the buffer is defined by the dwInformationClass parameter.

dwBufferSize [in]

Size, in bytes, of the buffer that the lpBuffer parameter points to. The caller should set this parameter according to the given dwInformationClass.

lpBytesReturned [out]

Pointer to a caller-allocated variable that receives the number of bytes returned in the buffer that lpBuffer points to if the call to FilterInstanceFindNext succeeds. This parameter is required and cannot be NULL.

Return value

FilterInstanceFindNext returns S_OK if successful. Otherwise, it returns an HRESULT error value, such as one of the following:

Return codeDescription
HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)

The buffer pointed to by lpBuffer is not large enough to contain the requested information. When this value is returned, lpBytesReturned will contain the size, in bytes, of the buffer required for the given dwInformationClass structure.

HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER)

An invalid value was specified for the dwInformationClass parameter. For example, if InstanceAggregateStandardInformation is specified for an operating system prior to Windows Vista, FilterInstanceFindNext returns this HRESULT value.

HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)

This HRESULT value is returned if there are no more unique instances of the minifilter.

 

Remarks

After the search handle is established by calling FilterInstanceFindFirst, call FilterInstanceFindNext to search for other instances for the minifilter specified in the call to FilterInstanceFindFirst.

FilterInstanceFindNext finds one instance per call.

Requirements

Target platform

Universal

Header

Fltuser.h (include FltUser.h)

Library

FltLib.lib

DLL

FltLib.dll

See also

FilterInstanceFindClose
FilterInstanceFindFirst
INSTANCE_AGGREGATE_STANDARD_INFORMATION
INSTANCE_BASIC_INFORMATION
INSTANCE_FULL_INFORMATION
INSTANCE_PARTIAL_INFORMATION

 

 

Send comments about this topic to Microsoft

Show: