FFFTPのソースコードです。
Revision | 30ebb6121268fa05348ee68725610b5be16d3f2e (tree) |
---|---|
Zeit | 2011-11-04 17:14:26 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Fix bugs of UTF-8 to UTF-16 API bridge.
@@ -1846,6 +1846,20 @@ END_ROUTINE | ||
1846 | 1846 | return r; |
1847 | 1847 | } |
1848 | 1848 | |
1849 | +BOOL CopyFileM(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, BOOL bFailIfExists) | |
1850 | +{ | |
1851 | + BOOL r = FALSE; | |
1852 | + wchar_t* pw0 = NULL; | |
1853 | + wchar_t* pw1 = NULL; | |
1854 | +START_ROUTINE | |
1855 | + pw0 = DuplicateMtoW(lpExistingFileName, -1); | |
1856 | + pw1 = DuplicateMtoW(lpNewFileName, -1); | |
1857 | + r = CopyFileW(pw0, pw1, bFailIfExists); | |
1858 | +END_ROUTINE | |
1859 | + FreeDuplicatedString(pw0); | |
1860 | + return r; | |
1861 | +} | |
1862 | + | |
1849 | 1863 | int mkdirM(const char * _Path) |
1850 | 1864 | { |
1851 | 1865 | int r = 0; |
@@ -158,6 +158,9 @@ BOOL sndPlaySoundM(LPCSTR pszSound, UINT fuSound); | ||
158 | 158 | #undef SetClipboardData |
159 | 159 | #define SetClipboardData SetClipboardDataM |
160 | 160 | HANDLE SetClipboardDataM(UINT uFormat, HANDLE hMem); |
161 | +#undef CopyFile | |
162 | +#define CopyFile CopyFileM | |
163 | +BOOL CopyFileM(LPCSTR lpExistingFileName, LPCSTR lpNewFileName, BOOL bFailIfExists); | |
161 | 164 | #undef mkdir |
162 | 165 | #define mkdir _mkdirM |
163 | 166 | int mkdirM(const char * _Path); |