SafeArrayGetElement function oleaut32

void SafeArrayGetElement(
  1. Pointer<SAFEARRAY> psa,
  2. Pointer<Int32> rgIndices,
  3. Pointer<NativeType> pv
)

Retrieves a single element of the array.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/oleauto/nf-oleauto-safearraygetelement.

Implementation

@pragma('vm:prefer-inline')
void SafeArrayGetElement(
  Pointer<SAFEARRAY> psa,
  Pointer<Int32> rgIndices,
  Pointer pv,
) {
  final hr$ = HRESULT(_SafeArrayGetElement(psa, rgIndices, pv));
  if (hr$.isError) throw WindowsException(hr$);
}