你的这种做法是VARIANT类型的做法,_variant_t类型重载了各种数据类型的=操作符,
vp1.vt = VT_BSTR ;
vp1.bstrVal = (_bstr_t)p1 ;
vp2.vt = VT_BSTR ;
vp2.bstrVal = (_bstr_t)p2 ;你可以简洁写为:vp1 = (_bstr_t)p1;
vp2 = (_bstr_t)p2;
vp1.vt = VT_BSTR ;
vp1.bstrVal = (_bstr_t)p1 ;
vp2.vt = VT_BSTR ;
vp2.bstrVal = (_bstr_t)p2 ;你可以简洁写为:vp1 = (_bstr_t)p1;
vp2 = (_bstr_t)p2;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货