We are migrating our C++ COM application to be unicode, and as part of this migration we want to migrate the constant strings in our IDL to unicode as well.
The problem is that at the moment, we still compile it both in ANSI and in UNICODE, which means that we can't use the L"String" construct to declare wide charts.
At the moment, our string constant defined like this:
const LPSTR STRING_CONST_NAME = "STRING VALUE";
And we want to define it like this:
const LP**T**STR STRING_CONST_NAME = "STRING VALUE";
If it were regular code we would just add the _T("STRING VALUE") macro which would have converted it to L"STRING VALUE" when compiling in unicode
But from what I can see we can't use it in the IDL because _T is a pure C++ construct.
Is our approach even correct ? May be we should define it like this no matter what:
const LP**T**STR STRING_CONST_NAME = L"STRING VALUE";