Checking IAccessible Return Values
Client developers should not rely on the COM macros SUCCEEDED and FAILED to test IAccessible return values, because values other than S_OK are considered a success. For example, a method can return S_FALSE, which is considered a success by the SUCCEEDED macro, but still receive a NULL pointer in an output parameter.
Client developers must guard against the possibility that some servers return error codes other than the documented values. To be safe, you must ensure that all the output parameters contain valid information and meet the following criteria:
- All pointers are non-NULL.
- The vt member of any VARIANT structure is not equal to VT_EMPTY.