"Dimitrie O. Paun" dimi@cs.toronto.edu writes:
Sorry, maybe I miss something, but I don't understand why it wouldn't:
BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL); BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL); #define CopyFile WINELIB_NAME_AW(CopyFile)
which means that if we use the explicit A or W versions, it will compile no matter what mode we're using.
Sure, in isolation it will work, but try integrating that in a test using TCHARs. For instance:
TSTR filename = _T("some_file");
handle = CreateFile(filename,...); WriteFile( handle, ...); etc. CopyFile( filename, _T("newfile"), FALSE ); /* now test some Unicode chars */ CopyFileW( filename, L"unicode_file_name", FALSE );
This won't work because you can't pass a TSTR to a W function. So you either need #ifdefs, or you need to use W functions and WCHAR throughout, which means you don't need TCHAR at all.