SafeArrayCopyData function oleaut32

void SafeArrayCopyData(
  1. Pointer<SAFEARRAY> psaSource,
  2. Pointer<SAFEARRAY> psaTarget
)

Copies the source array to the specified target array after releasing any resources in the target array.

Throws a WindowsException on failure.

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

Implementation

@pragma('vm:prefer-inline')
void SafeArrayCopyData(
  Pointer<SAFEARRAY> psaSource,
  Pointer<SAFEARRAY> psaTarget,
) {
  final hr$ = HRESULT(_SafeArrayCopyData(psaSource, psaTarget));
  if (hr$.isError) throw WindowsException(hr$);
}