While looking at the win32 xml APIs, I found https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms762722(v=vs.85)
Specifically the C API here:
HRESULT load(
VARIANT xmlSource,
VARIANT_BOOL *isSuccessful);
where
Parameters
xmlSource[in]
An indicator of the source XML to parse. This may be an URL (String/BSTR), a Request object (in an ASP page), an IStream, SAFEARRAY of bytes (VT_ARRAY|VT_UI1), a DOMDocument object, or any object that supports IStream, ISequentialStream, or IPersistStream. See Remarks for more information.
isSuccessful[out, retval]
True if the load succeeded; False if the load failed.
Return Values
S_OK
The value returned if successful.
S_FALSE
The value returned if the load fails.
E_INVALIDARG
The value returned if the isSuccessful parameter is Null.
So you have to pass a pointer to a bool to hold more or less the same information as the return value of the function, and if you pass a null pointer, you get your hand spanked…