getSizeMax method
Retrieves the size of the stream needed to save the object.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/objidl/nf-objidl-ipersiststream-getsizemax.
Implementation
int getSizeMax() {
final pcbSize = adaptiveCalloc<Uint64>();
final hr$ = HRESULT(_GetSizeMaxFn(ptr, pcbSize));
if (hr$.isError) {
free(pcbSize);
throw WindowsException(hr$);
}
final result$ = pcbSize.value;
free(pcbSize);
return result$;
}