mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[KERNEL32]
Don't make CopyFileExA() rely on Wine's strings conversions functions svn path=/trunk/; revision=50869
This commit is contained in:
parent
8dc411563b
commit
41ee0f405e
1 changed files with 25 additions and 26 deletions
|
@ -314,37 +314,36 @@ CopyFileExW (
|
|||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
CopyFileExA (
|
||||
LPCSTR lpExistingFileName,
|
||||
LPCSTR lpNewFileName,
|
||||
LPPROGRESS_ROUTINE lpProgressRoutine,
|
||||
LPVOID lpData,
|
||||
BOOL *pbCancel,
|
||||
DWORD dwCopyFlags
|
||||
)
|
||||
CopyFileExA(IN LPCSTR lpExistingFileName,
|
||||
IN LPCSTR lpNewFileName,
|
||||
IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL,
|
||||
IN LPVOID lpData OPTIONAL,
|
||||
IN LPBOOL pbCancel OPTIONAL,
|
||||
IN DWORD dwCopyFlags)
|
||||
{
|
||||
PWCHAR ExistingFileNameW;
|
||||
PWCHAR NewFileNameW;
|
||||
BOOL Result;
|
||||
BOOL Result = FALSE;
|
||||
UNICODE_STRING lpNewFileNameW;
|
||||
PUNICODE_STRING lpExistingFileNameW;
|
||||
|
||||
if (!(ExistingFileNameW = FilenameA2W(lpExistingFileName, FALSE)))
|
||||
return FALSE;
|
||||
lpExistingFileNameW = Basep8BitStringToStaticUnicodeString(lpExistingFileName);
|
||||
if (!lpExistingFileName)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(NewFileNameW = FilenameA2W(lpNewFileName, TRUE)))
|
||||
return FALSE;
|
||||
if (Basep8BitStringToDynamicUnicodeString(&lpNewFileNameW, lpNewFileName))
|
||||
{
|
||||
Result = CopyFileExW(lpExistingFileNameW->Buffer,
|
||||
lpNewFileNameW.Buffer,
|
||||
lpProgressRoutine,
|
||||
lpData,
|
||||
pbCancel,
|
||||
dwCopyFlags);
|
||||
|
||||
Result = CopyFileExW (ExistingFileNameW ,
|
||||
NewFileNameW ,
|
||||
lpProgressRoutine,
|
||||
lpData,
|
||||
pbCancel,
|
||||
dwCopyFlags);
|
||||
RtlFreeUnicodeString(&lpNewFileNameW);
|
||||
}
|
||||
|
||||
RtlFreeHeap (RtlGetProcessHeap (),
|
||||
0,
|
||||
NewFileNameW);
|
||||
|
||||
return Result;
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue