AfxOleTypeMatchGuid

BOOL AfxOleTypeMatchGuid( LPTYPEINFO pTypeInfo, TYPEDESC FAR* pTypeDesc, REFGUID guidType, ULONG cIndirectionLevels );

Return Value

Nonzero if the match was successful; otherwise 0.

Parameters

pTypeInfo

Pointer to the type info object from which pTypeDesc was obtained.

pTypeDesc

Pointer to a TYPEDESC structure.

guidType

The unique ID of the type.

cIndirectionLevels

The number of indirection levels.

Remarks

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.

Example

To check whether typedesc refers to a pointer to a IFontDisp:

AfxOleTypeMatchGuid( ptypeinfo, &typedesc, IID_IFontDisp, 1);

where IID_IFontDisp refers to the type and the number of indirection levels is 1 (because the sample is checking for a simple pointer).