Mar 31, 2016 at 6:31pm
Can't convert char to LPWSTR
Mar 31, 2016 at 7:10pm
LPWSTR is for wide characters (type wchar_t
).
Since your buffer is of type char
you need to use the ANSI version.
GetModuleFileNameA(NULL, buffer, MAX_PATH);
- note the final character of the function name is 'A'.