SafeArrayGetIID function oleaut32
Gets the GUID of the interface contained within the specified safe array.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/oleauto/nf-oleauto-safearraygetiid.
Implementation
Pointer<GUID> SafeArrayGetIID(Pointer<SAFEARRAY> psa) {
final pguid = adaptiveCalloc<GUID>();
final hr$ = HRESULT(_SafeArrayGetIID(psa, pguid));
if (hr$.isError) {
free(pguid);
throw WindowsException(hr$);
}
return pguid;
}