M
Mike Copeland
How can I convert a C-style string variable to LPCWSTR? I have code
that used to work on VC6.0 that didn't seem to care that a function call
that accepts an LPCWSTR argument wasn't that type, but now that I'm
trying to convert to VC10.0, these calls don't compile. 8<{{
So, I have calls such as:
MessageBox(NULL, emsg, L"Console Error", MB_OK);
where I can use the "L" in the literal, but the reference to "emsg"
(which is declared as "char[2048]") fails to compile. I can't find any
information about casting or converting such variables to something that
will compile. Please advise. TIA
that used to work on VC6.0 that didn't seem to care that a function call
that accepts an LPCWSTR argument wasn't that type, but now that I'm
trying to convert to VC10.0, these calls don't compile. 8<{{
So, I have calls such as:
MessageBox(NULL, emsg, L"Console Error", MB_OK);
where I can use the "L" in the literal, but the reference to "emsg"
(which is declared as "char[2048]") fails to compile. I can't find any
information about casting or converting such variables to something that
will compile. Please advise. TIA