Consider using *W versions of functions for compatibility with both unicode and ansi file names and directory paths.