getProperties method
Retrieves multiple sensor properties.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/sensorsapi/nf-sensorsapi-isensor-getproperties.
Implementation
IPortableDeviceValues? getProperties(IPortableDeviceKeyCollection? pKeys) {
final ppProperties = adaptiveCalloc<VTablePointer>();
final hr$ = HRESULT(
_GetPropertiesFn(ptr, pKeys?.ptr ?? nullptr, ppProperties),
);
if (hr$.isError) {
free(ppProperties);
throw WindowsException(hr$);
}
final result$ = ppProperties.value;
free(ppProperties);
if (result$.isNull) return null;
return .new(result$);
}