Frage

I need to assign the object of IWbemClassObject to the Variant or how can i convert this object to variant type.

Thanks.

War es hilfreich?

Lösung

IWbemClassObject* p = ...;  // initialized somehow

VARIANT v;
V_VT(&v) = VT_UNKNOWN;
(V_UNKNOWN(&v) = p)->AddRef();
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top