Call this function to determine whether a type descriptor (obtained from the type info) describes the type indicated by guidType with the given number of levels of indirection.
BOOL AfxOleTypeMatchGuid( LPTYPEINFO pTypeInfo, TYPEDESC FAR* pTypeDesc, REFGUID guidType, ULONG cIndirectionLevels );
- Pointer to the type info object from which pTypeDesc was obtained.
- Pointer to a TYPEDESC structure.
- The unique ID of the type.
- The number of indirection levels.
Nonzero if the match was successful; otherwise 0.
To check whether
typedesc refers to a pointer to a IFontDisp:
AfxOleTypeMatchGuid( ptypeinfo, &typedesc, IID_IFontDisp, 1);
IID_IFontDisp refers to the type and the number of indirection levels is 1 (because the sample is checking for a simple pointer).