IErrorInfo::GetGUID

Returns the GUID of interface that defined the error.

HRESULT GetGUID (
   GUID *   pguid);

Parameters

pguid

[out]
A pointer to memory in which to return the GUID of the interface that defined the error. If the error was defined by the operating system, the returned GUID is DB_NULLGUID. This is the same value as is returned in the iid element of the ERRORINFO structure returned by IErrorRecords::GetBasicErrorInfo.

Return Code

S_OK
The method succeeded.

E_INVALIDARG
pguid was a null pointer.

Comments

This GUID does not necessarily represent the source of the error; the source is the class or application that raised the error. Using the GUID, an application can handle errors in an interface independent of the class that implements the interface.