Incompatible with parameter of type “LPCWSTR”

To compile your code in Visual C++ you need to use Multi-Byte char WinAPI functions instead of Wide char ones.

Set Project -> Properties -> Advanced (or. General for older versions) -> Character Set option to Use Multi-Byte Character Set

also see the screenshot

Leave a Comment