Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b9910cb3
Commit
b9910cb3
authored
Jan 02, 2007
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement CopyFileWithProgress.
parent
86d4a9e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
9 deletions
+36
-9
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-2
path.c
dlls/kernel32/path.c
+31
-7
winbase.h
include/winbase.h
+3
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
b9910cb3
...
...
@@ -795,8 +795,8 @@
@ stdcall MoveFileExA(str str long)
@ stdcall MoveFileExW(wstr wstr long)
@ stdcall MoveFileW(wstr wstr)
# @ stub MoveFileWithProgressA
# @ stub MoveFileWithProgressW
@ stdcall MoveFileWithProgressA(str str ptr ptr long)
@ stdcall MoveFileWithProgressW(wstr wstr ptr ptr long)
@ stdcall MulDiv(long long long)
@ stdcall MultiByteToWideChar(long long str long ptr long)
# @ stub NlsConvertIntegerToString
...
...
dlls/kernel32/path.c
View file @
b9910cb3
...
...
@@ -982,9 +982,11 @@ BOOL WINAPI CopyFileExA(LPCSTR sourceFilename, LPCSTR destFilename,
/**************************************************************************
* MoveFile
Ex
W (KERNEL32.@)
* MoveFile
WithProgress
W (KERNEL32.@)
*/
BOOL
WINAPI
MoveFileExW
(
LPCWSTR
source
,
LPCWSTR
dest
,
DWORD
flag
)
BOOL
WINAPI
MoveFileWithProgressW
(
LPCWSTR
source
,
LPCWSTR
dest
,
LPPROGRESS_ROUTINE
fnProgress
,
LPVOID
param
,
DWORD
flag
)
{
FILE_BASIC_INFORMATION
info
;
UNICODE_STRING
nt_name
;
...
...
@@ -994,7 +996,8 @@ BOOL WINAPI MoveFileExW( LPCWSTR source, LPCWSTR dest, DWORD flag )
HANDLE
source_handle
=
0
,
dest_handle
;
ANSI_STRING
source_unix
,
dest_unix
;
TRACE
(
"(%s,%s,%04x)
\n
"
,
debugstr_w
(
source
),
debugstr_w
(
dest
),
flag
);
TRACE
(
"(%s,%s,%p,%p,%04x)
\n
"
,
debugstr_w
(
source
),
debugstr_w
(
dest
),
fnProgress
,
param
,
flag
);
if
(
flag
&
MOVEFILE_DELAY_UNTIL_REBOOT
)
return
add_boot_rename_entry
(
source
,
dest
,
flag
);
...
...
@@ -1087,7 +1090,10 @@ BOOL WINAPI MoveFileExW( LPCWSTR source, LPCWSTR dest, DWORD flag )
NtClose
(
source_handle
);
RtlFreeAnsiString
(
&
source_unix
);
RtlFreeAnsiString
(
&
dest_unix
);
return
(
CopyFileW
(
source
,
dest
,
TRUE
)
&&
DeleteFileW
(
source
));
if
(
!
CopyFileExW
(
source
,
dest
,
fnProgress
,
param
,
NULL
,
COPY_FILE_FAIL_IF_EXISTS
))
return
FALSE
;
return
DeleteFileW
(
source
);
}
FILE_SetDosError
();
/* if we created the destination, remove it */
...
...
@@ -1124,9 +1130,11 @@ error:
}
/**************************************************************************
* MoveFile
Ex
A (KERNEL32.@)
* MoveFile
WithProgress
A (KERNEL32.@)
*/
BOOL
WINAPI
MoveFileExA
(
LPCSTR
source
,
LPCSTR
dest
,
DWORD
flag
)
BOOL
WINAPI
MoveFileWithProgressA
(
LPCSTR
source
,
LPCSTR
dest
,
LPPROGRESS_ROUTINE
fnProgress
,
LPVOID
param
,
DWORD
flag
)
{
WCHAR
*
sourceW
,
*
destW
;
BOOL
ret
;
...
...
@@ -1139,11 +1147,27 @@ BOOL WINAPI MoveFileExA( LPCSTR source, LPCSTR dest, DWORD flag )
else
destW
=
NULL
;
ret
=
MoveFile
ExW
(
sourceW
,
destW
,
flag
);
ret
=
MoveFile
WithProgressW
(
sourceW
,
destW
,
fnProgress
,
param
,
flag
);
HeapFree
(
GetProcessHeap
(),
0
,
destW
);
return
ret
;
}
/**************************************************************************
* MoveFileExW (KERNEL32.@)
*/
BOOL
WINAPI
MoveFileExW
(
LPCWSTR
source
,
LPCWSTR
dest
,
DWORD
flag
)
{
return
MoveFileWithProgressW
(
source
,
dest
,
NULL
,
NULL
,
flag
);
}
/**************************************************************************
* MoveFileExA (KERNEL32.@)
*/
BOOL
WINAPI
MoveFileExA
(
LPCSTR
source
,
LPCSTR
dest
,
DWORD
flag
)
{
return
MoveFileWithProgressA
(
source
,
dest
,
NULL
,
NULL
,
flag
);
}
/**************************************************************************
* MoveFileW (KERNEL32.@)
...
...
include/winbase.h
View file @
b9910cb3
...
...
@@ -1831,6 +1831,9 @@ BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
BOOL
WINAPI
MoveFileExA
(
LPCSTR
,
LPCSTR
,
DWORD
);
BOOL
WINAPI
MoveFileExW
(
LPCWSTR
,
LPCWSTR
,
DWORD
);
#define MoveFileEx WINELIB_NAME_AW(MoveFileEx)
BOOL
WINAPI
MoveFileWithProgressA
(
LPCSTR
,
LPCSTR
,
LPPROGRESS_ROUTINE
,
LPVOID
,
DWORD
);
BOOL
WINAPI
MoveFileWithProgressW
(
LPCWSTR
,
LPCWSTR
,
LPPROGRESS_ROUTINE
,
LPVOID
,
DWORD
);
#define MoveFileWithProgress WINELIB_NAME_AW(MoveFileWithProgress)
INT
WINAPI
MulDiv
(
INT
,
INT
,
INT
);
BOOL
WINAPI
NotifyChangeEventLog
(
HANDLE
,
HANDLE
);
BOOL
WINAPI
ObjectCloseAuditAlarmA
(
LPCSTR
,
LPVOID
,
BOOL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment