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
cfbc26f3
Commit
cfbc26f3
authored
Mar 22, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Mar 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Forward AdvInstallFileA to its Unicode counterpart.
parent
72581bd2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
21 deletions
+57
-21
advpack.spec
dlls/advpack/advpack.spec
+1
-1
files.c
dlls/advpack/files.c
+56
-20
No files found.
dlls/advpack/advpack.spec
View file @
cfbc26f3
...
...
@@ -2,7 +2,7 @@
@ stdcall AddDelBackupEntryW(wstr wstr wstr long)
@ stdcall AddDelBackupEntry(str str str long) AddDelBackupEntryA
@ stdcall AdvInstallFileA(long str str str str long long)
#
stdcall AdvInstallFileW(long wstr wstr wstr wstr long long)
@
stdcall AdvInstallFileW(long wstr wstr wstr wstr long long)
@ stdcall AdvInstallFile(long str str str str long long) AdvInstallFileA
@ stdcall CloseINFEngine(long)
@ stdcall DelNodeA(str long)
...
...
dlls/advpack/files.c
View file @
cfbc26f3
...
...
@@ -178,7 +178,7 @@ UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification,
Notification
==
SPFILENOTIFY_DELETEERROR
||
Notification
==
SPFILENOTIFY_COPYERROR
)
{
return
SetupDefaultQueueCallback
A
(
Context
,
Notification
,
return
SetupDefaultQueueCallback
W
(
Context
,
Notification
,
Param1
,
Param2
);
}
...
...
@@ -188,6 +188,42 @@ UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification,
/***********************************************************************
* AdvInstallFileA (ADVPACK.@)
*
* See AdvInstallFileW.
*/
HRESULT
WINAPI
AdvInstallFileA
(
HWND
hwnd
,
LPCSTR
lpszSourceDir
,
LPCSTR
lpszSourceFile
,
LPCSTR
lpszDestDir
,
LPCSTR
lpszDestFile
,
DWORD
dwFlags
,
DWORD
dwReserved
)
{
UNICODE_STRING
sourcedir
,
sourcefile
;
UNICODE_STRING
destdir
,
destfile
;
HRESULT
res
;
TRACE
(
"(%p,%s,%s,%s,%s,%ld,%ld)
\n
"
,
hwnd
,
debugstr_a
(
lpszSourceDir
),
debugstr_a
(
lpszSourceFile
),
debugstr_a
(
lpszDestDir
),
debugstr_a
(
lpszDestFile
),
dwFlags
,
dwReserved
);
if
(
!
lpszSourceDir
||
!
lpszSourceFile
||
!
lpszDestDir
)
return
E_INVALIDARG
;
RtlCreateUnicodeStringFromAsciiz
(
&
sourcedir
,
lpszSourceDir
);
RtlCreateUnicodeStringFromAsciiz
(
&
sourcefile
,
lpszSourceFile
);
RtlCreateUnicodeStringFromAsciiz
(
&
destdir
,
lpszDestDir
);
RtlCreateUnicodeStringFromAsciiz
(
&
destfile
,
lpszDestFile
);
res
=
AdvInstallFileW
(
hwnd
,
sourcedir
.
Buffer
,
sourcefile
.
Buffer
,
destdir
.
Buffer
,
destfile
.
Buffer
,
dwFlags
,
dwReserved
);
RtlFreeUnicodeString
(
&
sourcedir
);
RtlFreeUnicodeString
(
&
sourcefile
);
RtlFreeUnicodeString
(
&
destdir
);
RtlFreeUnicodeString
(
&
destfile
);
return
res
;
}
/***********************************************************************
* AdvInstallFileW (ADVPACK.@)
*
* Copies a file from the source to a destination.
*
* PARAMS
...
...
@@ -207,20 +243,20 @@ UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification,
* If lpszDestFile is NULL, the destination filename is the same as
* lpszSourceFIle.
*/
HRESULT
WINAPI
AdvInstallFile
A
(
HWND
hwnd
,
LPCSTR
lpszSourceDir
,
LPC
STR
lpszSourceFile
,
LPCSTR
lpszDestDir
,
LPC
STR
lpszDestFile
,
DWORD
dwFlags
,
DWORD
dwReserved
)
HRESULT
WINAPI
AdvInstallFile
W
(
HWND
hwnd
,
LPCWSTR
lpszSourceDir
,
LPCW
STR
lpszSourceFile
,
LPCWSTR
lpszDestDir
,
LPCW
STR
lpszDestFile
,
DWORD
dwFlags
,
DWORD
dwReserved
)
{
PSP_FILE_CALLBACK_
A
pFileCallback
;
LPSTR
szPath
,
szDestFilename
;
char
szRootPath
[
ROOT_LENGTH
];
PSP_FILE_CALLBACK_
W
pFileCallback
;
LP
W
STR
szPath
,
szDestFilename
;
WCHAR
szRootPath
[
ROOT_LENGTH
];
DWORD
dwLen
,
dwLastError
;
HSPFILEQ
fileQueue
;
PVOID
pContext
;
TRACE
(
"(%p,%
p,%p,%p,%p,%ld,%ld)
\n
"
,
hwnd
,
debugstr_a
(
lpszSourceDir
),
debugstr_
a
(
lpszSourceFile
),
debugstr_a
(
lpszDestDir
),
debugstr_
a
(
lpszDestFile
),
dwFlags
,
dwReserved
);
TRACE
(
"(%p,%
s,%s,%s,%s,%ld,%ld)
\n
"
,
hwnd
,
debugstr_w
(
lpszSourceDir
),
debugstr_
w
(
lpszSourceFile
),
debugstr_w
(
lpszDestDir
),
debugstr_
w
(
lpszDestFile
),
dwFlags
,
dwReserved
);
if
(
!
lpszSourceDir
||
!
lpszSourceFile
||
!
lpszDestDir
)
return
E_INVALIDARG
;
...
...
@@ -232,25 +268,25 @@ HRESULT WINAPI AdvInstallFileA(HWND hwnd, LPCSTR lpszSourceDir, LPCSTR lpszSourc
pContext
=
NULL
;
dwLastError
=
ERROR_SUCCESS
;
lstrcpyn
A
(
szRootPath
,
lpszSourceDir
,
ROOT_LENGTH
);
szPath
=
(
LPSTR
)
lpszSourceDir
+
ROOT_LENGTH
;
lstrcpyn
W
(
szRootPath
,
lpszSourceDir
,
ROOT_LENGTH
);
szPath
=
(
LP
W
STR
)
lpszSourceDir
+
ROOT_LENGTH
;
/* use lpszSourceFile as destination filename if lpszDestFile is NULL */
if
(
lpszDestFile
)
{
dwLen
=
lstrlen
A
(
lpszDestFile
);
szDestFilename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwLen
);
lstrcpy
A
(
szDestFilename
,
lpszDestFile
);
dwLen
=
lstrlen
W
(
lpszDestFile
);
szDestFilename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwLen
*
sizeof
(
WCHAR
)
);
lstrcpy
W
(
szDestFilename
,
lpszDestFile
);
}
else
{
dwLen
=
lstrlen
A
(
lpszSourceFile
);
szDestFilename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwLen
);
lstrcpy
A
(
szDestFilename
,
lpszSourceFile
);
dwLen
=
lstrlen
W
(
lpszSourceFile
);
szDestFilename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwLen
*
sizeof
(
WCHAR
)
);
lstrcpy
W
(
szDestFilename
,
lpszSourceFile
);
}
/* add the file copy operation to the setup queue */
if
(
!
SetupQueueCopy
A
(
fileQueue
,
szRootPath
,
szPath
,
lpszSourceFile
,
NULL
,
if
(
!
SetupQueueCopy
W
(
fileQueue
,
szRootPath
,
szPath
,
lpszSourceFile
,
NULL
,
NULL
,
lpszDestDir
,
szDestFilename
,
dwFlags
))
{
dwLastError
=
GetLastError
();
...
...
@@ -272,7 +308,7 @@ HRESULT WINAPI AdvInstallFileA(HWND hwnd, LPCSTR lpszSourceDir, LPCSTR lpszSourc
pFileCallback
=
pQueueCallback
;
/* perform the file copy */
if
(
!
SetupCommitFileQueue
A
(
hwnd
,
fileQueue
,
pFileCallback
,
pContext
))
if
(
!
SetupCommitFileQueue
W
(
hwnd
,
fileQueue
,
pFileCallback
,
pContext
))
{
dwLastError
=
GetLastError
();
goto
done
;
...
...
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