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

Thanks.

有帮助吗?

解决方案

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

VARIANT v;
V_VT(&v) = VT_UNKNOWN;
(V_UNKNOWN(&v) = p)->AddRef();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top