FilterVolumeFindNext function (fltuser.h)

The FilterVolumeFindNext function continues a volume search started by a call to FilterVolumeFindFirst.

Syntax

HRESULT FilterVolumeFindNext(
  [in]  HANDLE                          hVolumeFind,
  [in]  FILTER_VOLUME_INFORMATION_CLASS dwInformationClass,
  [out] LPVOID                          lpBuffer,
  [in]  DWORD                           dwBufferSize,
  [out] LPDWORD                         lpBytesReturned
);

Parameters

[in] hVolumeFind

Volume search handle returned by a previous call to FilterVolumeFindFirst.

[in] dwInformationClass

Type of information requested. This parameter can be one of the following values.

Value Meaning
FilterVolumeBasicInformation The buffer pointed to by the lpBuffer parameter receives a FILTER_VOLUME_BASIC_INFORMATION structure for the volume.
FilterVolumeStandardInformation The buffer pointed to by the lpBuffer parameter receives a FILTER_VOLUME_STANDARD_INFORMATION structure for the volume. This structure is available starting with Windows Vista.

[out] lpBuffer

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.

[in] dwBufferSize

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

[out] lpBytesReturned

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

Return value

FilterVolumeFindNext returns S_OK if it successfully returns volume information. Otherwise, it returns an HRESULT error value, such as one of the following:

Return code Description
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 FilterVolumeStandardInformation is specified for an operating system prior to Windows Vista, FilterVolumeFindNext returns this HRESULT value.
HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)
No more volumes were found in the list of volumes known to the filter manager.

Remarks

After the search handle is established by calling FilterVolumeFindFirst, use the FilterVolumeFindNext function to search for other volumes. FilterVolumeFindNext finds one volume per call.

Note that when using FilterVolumeFindFirst and FilterVolumeFindNext to enumerate the list of volumes known to the filter manager, it is possible for two or more of the volumes in the list to have the same name. For more information, see Understanding Volume Enumerations with Duplicate Volume Names.

Requirements

Requirement Value
Target Platform Universal
Header fltuser.h (include FltUser.h)
Library FltLib.lib
DLL FltLib.dll

See also

FILTER_VOLUME_BASIC_INFORMATION

FILTER_VOLUME_STANDARD_INFORMATION

FilterVolumeFindClose

FilterVolumeFindFirst