IFunctionInstanceCollection::Item method

[Function Discovery is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Gets the specified function instance, by index.

Syntax

HRESULT Item(
  DWORD             dwIndex,
  IFunctionInstance **ppIFunctionInstance
);

Parameters

dwIndex

The zero-based index of the function instance to be retrieved.

ppIFunctionInstance

A pointer to an IFunctionInstance interface pointer that receives the function instance.

Return Value

Possible return values include, but are not limited to, the following.

Return code Description
S_OK
The method completed successfully.
E_INVALIDARG
The ppFunctionInstance parameter is NULL or dwIndex is out of range.

Remarks

The GetCount and Item methods enables you to enumerate all of the function instances contained in a collection using a simple for or while loop.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header functiondiscoveryapi.h
DLL FunDisc.dll

See Also

IFunctionInstanceCollection