Following implicit cast occurred error C2664 from cl compiler. (const WCHAR *) => (const ushort *) (const ushort *) => (PCWSTR) So fixed by using a explicit cast which reinterpret_cast.