ISensorDriver::OnGetSupportedEvents method

The ISensorDriver::OnGetSupportedEvents method retrieves the list of events that the specified sensor can raise.

Syntax

HRESULT OnGetSupportedEvents(
  LPWSTR pwszSensorID,
  GUID   **ppSupportedEvents,
  ULONG  *pulEventCount
);

Parameters

pwszSensorID

LPWSTR that contains the ID for the sensor from which the client application is requesting the events list.

ppSupportedEvents

Address of a GUID pointer that receives the array of supported event IDs. If the driver does not support events, return a buffer containing a single GUID that has its value set to GUID_NULL.

pulEventCount

Address of a ULONG that receives the count of event IDs in the buffer returned through ppSupportedEvents. If the driver does not support events, set this value to zero.

Return Value

If the operation succeeds, this method returns S_OK. Otherwise, this method returns one of the error codes that are defined in Winerror.h.

Remarks

Event IDs are represented by GUIDs. Platform-defined events are defined in sensors.h.

You must use CoTaskMemAlloc to create the event ID buffer. The sensor class extension frees this memory.

Requirements

   
Target Platform Windows
Header sensorsclassextension.h
Library SensorsClassExtension.lib

See Also

ISensorDriver