Use "PATH.c_str()" to get a C-style string that you can pass to that function.

By the way, make sure that you're not using the Unicode functions, because that would also make it fail.