In the case of Microsoft® Visual Basic®, if an error occurs within the method, the method will throw an exception. The script or program must check for these exceptions separately from the return value.
For C++, the return value is always an HRESULT, and indicates whether the method call succeeded or failed. If the call failed then the return value indicates why it failed.
The following table lists the values of common HRESULT values:
Name | Description |
---|---|
S_OK | Operation successful |
ERROR_NO_MORE_ITEMS | An enumeration operation ran out of items. |