Please visit DEMANDDRAFT.SHOP for quality of products...

Ad

Search This Blog

Tuesday, December 18, 2012

How to handle Varinat passed to COM components in VC++

A pointer to another VARIANTARG is passed in pvarVal. This referenced VARIANTARG will never have the VT_BYREF bit set in vt, so only one level of indirection can ever be present. This value can be used to support languages that allow functions to change the types of variables passed by reference.

inline VARIANT * GetVARIANT(VARIANT * v)
{
while( v && v->vt == (VT_BYREF|VT_VARIANT) )
v = v->pvarVal;
return v;
}

No comments:

Post a Comment