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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -