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>

Incoming search terms for the article:

ct2w macro, char array to bstr, convert char array to BSTR, CT2W include, CT2W header, CT2W, BSTR header, ATL::CT2W, sysallocstring(ct2w, char array to _bstr_t, CT2W c, header file for ct2w, SSysAllocString(CT2W atl h, convert char to bstr c, how to convert char array to bstr, convert char array to a bstr in c, Converting char array to BSTR, copy char array to BSTR, create array of BSTR*, ct2w atl, ct2w char, _bstr_t create from char array, ct2w include what to, where CT2W include, vector of char to bstr, vc 6 0 ct2w, SysAllocString char Array, how to convert char buffer to CComBSTR, how to convert a char to a BSTR, Header file for CT2W(), ct2w macro header file, convert _bstr_t to char array, convert vector array to bstr in c, c convert char * to bstr, c char to BSTR, C 2010 move char to BSTR, bstr ct2w, bstr Append(), bstr append char array, appending a char* to bstr, append to bstr, append single character to bstr, append char to bstr, c CT2W, cast char * to _bstr_t, CComBSTR char, convert from BSTR to character array in c, convert from BSTR to char array, char* bstr*, convert bstr* to char array, convert bstr to char array in c, com bstr character array, chararray to bstr, char array to bstr vc 6, char array to bstr c, ccombstr to char array coversion, #include ct2w

Leave a Reply

Features Stats Integration Plugin developed by YD