First, CreateProcess is a macro that switches between CreateProcessA and CreateProcessW, which accepts strings in ANSI or Unicode, respectively. It depends on your project build settings (character set project properties), Unicode vs Multi-Byte. Typically, you want everything to be in Unicode, as this allows for globalization and adds the ability to provide more supported languages.
A complaint when converting from char to LPCWSTR indicates that it expects a type of WSTR, or a string with wide strings or unicode. A workaround is to declare your characters using the _T ("blahblah") macro.
source
share