Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
cfbc26f3
Commit
cfbc26f3
authored
19 years ago
by
James Hawkins
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
advpack: Forward AdvInstallFileA to its Unicode counterpart.
parent
72581bd2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/advpack/advpack.spec
+1
-1
1 addition, 1 deletion
dlls/advpack/advpack.spec
dlls/advpack/files.c
+56
-20
56 additions, 20 deletions
dlls/advpack/files.c
with
57 additions
and
21 deletions
dlls/advpack/advpack.spec
+
1
−
1
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)
...
...
This diff is collapsed.
Click to expand it.
dlls/advpack/files.c
+
56
−
20
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
,
LPCSTR
lpszSourceFile
,
LPCSTR
lpszDestDir
,
LPCSTR
lpszDestFile
,
DWORD
dwFlags
,
DWORD
dwReserved
)
HRESULT
WINAPI
AdvInstallFile
W
(
HWND
hwnd
,
LPC
W
STR
lpszSourceDir
,
LPC
W
STR
lpszSourceFile
,
LPC
W
STR
lpszDestDir
,
LPC
W
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment