setBufferValue method

void setBufferValue(
  1. Pointer<PROPERTYKEY> key,
  2. Pointer<Uint8> pValue,
  3. int cbValue
)

Adds a new BYTE* value (type VT_VECTOR | VT_UI1) or overwrites an existing one.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/wpd_sdk/iportabledevicevalues-setbuffervalue.

Implementation

@pragma('vm:prefer-inline')
void setBufferValue(
  Pointer<PROPERTYKEY> key,
  Pointer<Uint8> pValue,
  int cbValue,
) {
  final hr$ = HRESULT(_SetBufferValueFn(ptr, key, pValue, cbValue));
  if (hr$.isError) throw WindowsException(hr$);
}