c++ - std::string to LPOLESTR -
i have array of strings this:
using std::string; string myarray[] = { string("abc"), string("foo"), string("muh") };
now want use function:
hresult init(t* begin, t* end, iunknown* punk, ccomenumflags flags = atlflagnocopy );
t in case lpolestr. need convert array of std::string lpolestr respectively need lpolestr* begin , end of array. how done?
thx in advance
atl has set of macros string conversions. in case, can use:
lpolestr olestr = a2ole(std_str.c_str());
note olestr wchar_t*, if you're using std::wstring (or wide char string literals) don't need macro:
lpolestr olestr = std_wstr.c_str();
Comments
Post a Comment