Returns a GUID corresponding to the specified dwGuidKind. The dwGuidKind parameter has several values defined. See GUIDKIND. Additional flags can be defined at a later time and will be recognized by an IProvideClassInfo2 implementation. See IProvideClassInfo3.
HRESULT GetGUID(
DWORD
dwGuidKind, // Specifies the desired GUID
GUID *pGUID // Receives a pointer to the desired GUID
);
Parameters
dwGuidKind
[in] Specifies the GUID desired on return. This parameter takes a value from the GUIDKIND enumeration.
pGUID
[out] The address of the callerÆs variable in which to store the GUID associated with dwGuidKind.
Return Values
S_OK
The GUID was successfully returned in *pGUID.
E_POINTER
The address in pGUID is not valid (such as NULL).
E_UNEXPECTED
An unknown error occurred.
E_INVALIDARG
The dwGuidKind value does not correspond to a supported GUID kind.
Remarks
E_NOTIMPL is not a valid return code since it would be pointless to implement this interface without implementing this method. E_INVALIDARG is not valid when dwGuidKind is GUIDKIND_DEFAULT_SOURCE_DISP_IID and the object is not implementing IProvideClassInfo2 as part of its implementation of IProvideClassInfo3.
Any object implementing IProvideClassInfo3 should support at least GUIDKIND_DEFAULT_IID through this method, so E_NOTIMPL is not a valid return code for IProvideClassInfo3 as it is for IProvideClassInfo2.
See Also