1)将_variant_t型转化为int型
关于将_variant_t型转化为int型,网上有好多好多参考,但好多都很复杂并且还不对,其实整个转化过程就只一行代码可以搞定:
_variant_t a;int b;b=_ttoi((LPCTSTR)(_bstr_t)a);
1)将_variant_t型转化为string型
_variant_t var;string str = (const char *)_bstr_t(var);
Copyright @ 2024 wj0816 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster