You don't need any conversion from non-constant to constant string. Apparently, they are compatible in the assignment direction you want. Let's see:
#include <windows.h>
LPWSTR variable = L"my string";
variable[0] = 'M';
LPCWSTR constString = variable;
If you need to do the opposite, type cast is needed, because it would break the assumption on the string data being immutable. There are two ways:
LPWSTR newString = (LPWSTR)constString;
LPWSTR newString2 = const_cast<LPWSTR>(constString);
—SA