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
531f7956
Commit
531f7956
authored
Jul 22, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Handle quoted arguments to rundll exports.
parent
17f66097
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
16 deletions
+27
-16
advpack.c
dlls/advpack/advpack.c
+4
-4
advpack_private.h
dlls/advpack/advpack_private.h
+1
-1
files.c
dlls/advpack/files.c
+2
-2
install.c
dlls/advpack/install.c
+19
-8
install.c
dlls/advpack/tests/install.c
+1
-1
No files found.
dlls/advpack/advpack.c
View file @
531f7956
...
...
@@ -175,7 +175,7 @@ void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
FIXME
(
"Need to support changing paths - default will be used
\n
"
);
/* set all ldids to dest */
while
((
ptr
=
get_parameter
(
&
key
,
','
)))
while
((
ptr
=
get_parameter
(
&
key
,
','
,
FALSE
)))
{
ldid
=
atolW
(
ptr
);
SetupSetDirectoryIdW
(
hInf
,
ldid
,
dest
);
...
...
@@ -508,12 +508,12 @@ HRESULT WINAPI RegisterOCX(HWND hWnd, HINSTANCE hInst, LPCSTR cmdline, INT show)
cmdline_ptr
=
cmdline_copy
;
lstrcpyW
(
cmdline_copy
,
cmdlineW
.
Buffer
);
ocx_filename
=
get_parameter
(
&
cmdline_ptr
,
','
);
ocx_filename
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
!
ocx_filename
||
!*
ocx_filename
)
goto
done
;
str_flags
=
get_parameter
(
&
cmdline_ptr
,
','
);
param
=
get_parameter
(
&
cmdline_ptr
,
','
);
str_flags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
param
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
hm
=
LoadLibraryExW
(
ocx_filename
,
NULL
,
LOAD_WITH_ALTERED_SEARCH_PATH
);
if
(
!
hm
)
...
...
dlls/advpack/advpack_private.h
View file @
531f7956
...
...
@@ -22,7 +22,7 @@
#define __ADVPACK_PRIVATE_H
HRESULT
do_ocx_reg
(
HMODULE
hocx
,
BOOL
do_reg
,
const
WCHAR
*
flags
,
const
WCHAR
*
param
)
DECLSPEC_HIDDEN
;
LPWSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
)
DECLSPEC_HIDDEN
;
LPWSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
,
BOOL
quoted
)
DECLSPEC_HIDDEN
;
void
set_ldids
(
HINF
hInf
,
LPCWSTR
pszInstallSection
,
LPCWSTR
pszWorkingDir
)
DECLSPEC_HIDDEN
;
HRESULT
launch_exe
(
LPCWSTR
cmd
,
LPCWSTR
dir
,
HANDLE
*
phEXE
)
DECLSPEC_HIDDEN
;
...
...
dlls/advpack/files.c
View file @
531f7956
...
...
@@ -501,8 +501,8 @@ HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT
lstrcpyW
(
cmdline_copy
,
cmdline
);
/* get the parameters at indexes 0 and 1 respectively */
szFilename
=
get_parameter
(
&
cmdline_ptr
,
','
);
szFlags
=
get_parameter
(
&
cmdline_ptr
,
','
);
szFilename
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
szFlags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
szFlags
)
dwFlags
=
atolW
(
szFlags
);
...
...
dlls/advpack/install.c
View file @
531f7956
...
...
@@ -205,13 +205,24 @@ static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, const void *
/* sequentially returns pointers to parameters in a parameter list
* returns NULL if the parameter is empty, e.g. one,,three */
LPWSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
)
LPWSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
,
BOOL
quoted
)
{
LPWSTR
token
=
*
params
;
if
(
!*
params
)
return
NULL
;
if
(
quoted
&&
*
token
==
'"'
)
{
WCHAR
*
end
=
strchrW
(
token
+
1
,
'"'
);
if
(
end
)
{
*
end
=
0
;
*
params
=
end
+
1
;
token
=
token
+
1
;
}
}
*
params
=
strchrW
(
*
params
,
separator
);
if
(
*
params
)
*
(
*
params
)
++
=
'\0'
;
...
...
@@ -760,10 +771,10 @@ INT WINAPI LaunchINFSectionW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT sho
cmdline_ptr
=
cmdline_copy
;
lstrcpyW
(
cmdline_copy
,
cmdline
);
inf_filename
=
get_parameter
(
&
cmdline_ptr
,
','
);
install_sec
=
get_parameter
(
&
cmdline_ptr
,
','
);
inf_filename
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
install_sec
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
str_flags
=
get_parameter
(
&
cmdline_ptr
,
','
);
str_flags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
str_flags
)
flags
=
atolW
(
str_flags
);
...
...
@@ -853,12 +864,12 @@ HRESULT WINAPI LaunchINFSectionExW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, I
cmdline_ptr
=
cmdline_copy
;
lstrcpyW
(
cmdline_copy
,
cmdline
);
cabinfo
.
pszInf
=
get_parameter
(
&
cmdline_ptr
,
','
);
cabinfo
.
pszSection
=
get_parameter
(
&
cmdline_ptr
,
','
);
cabinfo
.
pszCab
=
get_parameter
(
&
cmdline_ptr
,
','
);
cabinfo
.
pszInf
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
cabinfo
.
pszSection
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
cabinfo
.
pszCab
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
*
cabinfo
.
szSrcPath
=
'\0'
;
flags
=
get_parameter
(
&
cmdline_ptr
,
','
);
flags
=
get_parameter
(
&
cmdline_ptr
,
','
,
TRUE
);
if
(
flags
)
cabinfo
.
dwFlags
=
atolW
(
flags
);
...
...
dlls/advpack/tests/install.c
View file @
531f7956
...
...
@@ -242,7 +242,7 @@ static void test_LaunchINFSectionEx(void)
lstrcat
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
test.inf
\"
,
\"
DefaultInstall
\"
,
\"
c:,imacab.cab
\"
,
\"
4
\"
"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
todo_wine
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
/* The 'No UI' flag seems to have no effect whatsoever on Windows.
* So only do this test in interactive mode.
...
...
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