#include <stdio.h> #include <wchar.h> #include <stdlib.h> #define MAX_PATH 1024 FILE* wfopen(const wchar_t* filename, const wchar_t* mode) { char fn[MAX_PATH]; char m[MAX_PATH]; wcstombs(fn, filename, MAX_PATH); wcstombs(m, mode, MAX_PATH); return fopen(fn, m); }
http://www.cnblogs.com/SunWentao/archive/2008/11/03/1325687.html