IQueryGuid::QueryGuid

virtual bool IQueryGuid::QueryGuid(REFGUID guid, void ** ppvObj)

Cast object to a pointer type given a GUID.

Defined in: GuidCast.h

Return Value

true if object is successfully cast to the new data type, otherwise false.

Parameters

guid

Input GUID that determines the data type to cast to.

ppvObj

Output parameter to receive the result of the cast.

Comments

This function is very similar to IUnknown's QueryInterface, but it is more generic. It can be used to cast to any C++ data type using a GUID. It provides a more flexible and efficient way to dynamically cast objects and doesn't incur the overhead of C++ RTTI.