Jul 10
How to convert a character array to a BSTR?
I explain to you how to convert a character array to a BSTR.
char g_url[512] = “”;
BSTR oURL;
You could use the CT2W macro:
oURL = SysAllocString(CT2W(g_url));
This macro is defined in ATL header files #include <atlbase.h>
Related Posts: