Signals an error if a result code indicates a failure.
com
check-hresult hresult function-name
hresult⇩ |
An integer hresult. |
function-name⇩ |
A name for inclusion in the error message. |
The macro check-hresult
checks hresult and returns if it is one of the 'succeeded' values, for instance S_OK
or S_FALSE
. Otherwise check-hresult
signals an error of type com-error, which will include function-name in its message.
(check-hresult S_OK "test") => nil
(check-hresult E_NOINTERFACE "test") signals an error mentioning "test"
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38