This class is derived from the VARIANT structure. This means you can pass a COleVariant in a parameter that calls for a VARIANT and that the data members of the VARIANT structure are accessible data members of COleVariant
你只要查一下VARIANT就知道了,一般是用VARIANT的bstrVal成员,不过要注意bstrVal是BSTR型的。
你只要查一下VARIANT就知道了,一般是用VARIANT的bstrVal成员,不过要注意bstrVal是BSTR型的。
variant.ChangeType(BSTR?)
CString str;
str = variant.bstrVal;
CString cName;
cName=vValue1.bstrVal;
variant.ChangeType(VT_BSTR)
CString str;
str = variant.bstrVal;