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
06a3c3a2
Commit
06a3c3a2
authored
Feb 12, 2008
by
Erich Hoover
Committed by
Alexandre Julliard
Feb 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement ReplaceFileA.
parent
8d555e82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
4 deletions
+31
-4
file.c
dlls/kernel32/file.c
+31
-4
No files found.
dlls/kernel32/file.c
View file @
06a3c3a2
...
...
@@ -1542,10 +1542,37 @@ BOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,
LPCSTR
lpBackupFileName
,
DWORD
dwReplaceFlags
,
LPVOID
lpExclude
,
LPVOID
lpReserved
)
{
FIXME
(
"(%s,%s,%s,%08x,%p,%p) stub
\n
"
,
lpReplacedFileName
,
lpReplacementFileName
,
lpBackupFileName
,
dwReplaceFlags
,
lpExclude
,
lpReserved
);
SetLastError
(
ERROR_UNABLE_TO_MOVE_REPLACEMENT
);
return
FALSE
;
WCHAR
*
replacedW
,
*
replacementW
,
*
backupW
=
NULL
;
BOOL
ret
;
/* This function only makes sense when the first two parameters are defined */
if
(
!
lpReplacedFileName
||
!
(
replacedW
=
FILE_name_AtoW
(
lpReplacedFileName
,
TRUE
)))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
lpReplacementFileName
||
!
(
replacementW
=
FILE_name_AtoW
(
lpReplacementFileName
,
TRUE
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
replacedW
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
/* The backup parameter, however, is optional */
if
(
lpBackupFileName
)
{
if
(
!
(
backupW
=
FILE_name_AtoW
(
lpBackupFileName
,
TRUE
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
replacedW
);
HeapFree
(
GetProcessHeap
(),
0
,
replacementW
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
}
ret
=
ReplaceFileW
(
replacedW
,
replacementW
,
backupW
,
dwReplaceFlags
,
lpExclude
,
lpReserved
);
HeapFree
(
GetProcessHeap
(),
0
,
replacedW
);
HeapFree
(
GetProcessHeap
(),
0
,
replacementW
);
HeapFree
(
GetProcessHeap
(),
0
,
backupW
);
return
ret
;
}
...
...
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