Trait intercom::ISupportErrorInfo [] [src]

pub trait ISupportErrorInfo {
    fn interface_supports_error_info(&self, riid: REFIID) -> HRESULT;
}

The ISupportErrorInfo COM interface.

The ISupportErrorInfo is part of COM error handling concept. As the methods are traditionally limited to HRESULT return values, they may make more detailed IErrorInfo data available through the error info APIs.

The ISupportErrorInfo interface communicates which interfaces that an object implements support detailed error info. When a COM client receives an error-HRESULT, it may query for error info support through this interface. If the interface returns an S_OK as opposed to S_FALSE return value, the client can then use separate error info APIs to retrieve a detailed IErrorInfo object that contains more details about the error, such as the error message.

Intercom COM classes support the detailed error info for all user specified interfaces automatically. Only methods that return a two-parameter Result<S,E> value will store the detailed IErrorInfo. Other methods will set a null IErrorInfo value.

Required Methods

Informs the current COM class supports IErrorInfo for a specific interface.

  • riid - The IID of the interface to query.

Returns S_OK if the object supports IErrorInfo for the interface specified by the riid parameter. Otherwise returns S_FALSE - even in the case the object doesn't implement riid at all.

Description

If the object returns S_OK for an interface, then any methods the object implements for that interface must store the IErrorInfo on failure.

Intercom will implement the support for IErrorInfo automatically for all custom interfaces the user defines. This includes returning S_OK from this method.

Implementors