ISensorCollection::GetAt method

Retrieves the sensor at the specified index in the collection.

Syntax


HRESULT GetAt(
  [in]  ULONG   ulIndex,
  [out] ISensor **ppSensor
);

Parameters

ulIndex [in]

ULONG containing the index of the sensor to retrieve.

ppSensor [out]

Address of an ISensor pointer that receives the pointer to the specified sensor.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

E_POINTER

NULL was passed in for ppSensor.

 

Examples

For an example of how to retrieve a sensor by index, see Setting and Retrieving Sensor Properties.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported

Header

Sensorsapi.h

Library

Sensorsapi.lib

DLL

Sensorsapi.dll

See also

ISensorCollection

 

 

Community Additions

ADD
Show: