Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
46fe9448
Commit
46fe9448
authored
Apr 11, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Apr 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Implement LaunchINFSectionEx.
parent
65b50022
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
23 deletions
+76
-23
files.c
dlls/advpack/files.c
+2
-19
install.c
dlls/advpack/install.c
+74
-4
No files found.
dlls/advpack/files.c
View file @
46fe9448
...
...
@@ -34,6 +34,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
advpack
);
LPWSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
);
/* converts an ansi double null-terminated list to a unicode list */
static
LPWSTR
ansi_to_unicode_list
(
LPCSTR
ansi_list
)
{
...
...
@@ -452,25 +454,6 @@ HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
return
ret
;
}
/* sequentially returns pointers to parameters in a parameter list
* returns NULL if the parameter is empty, e.g. one,,three */
static
LPWSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
)
{
LPWSTR
token
=
*
params
;
if
(
!*
params
)
return
NULL
;
*
params
=
strchrW
(
*
params
,
separator
);
if
(
*
params
)
*
(
*
params
)
++
=
'\0'
;
if
(
!*
token
)
return
NULL
;
return
token
;
}
/***********************************************************************
* DelNodeRunDLL32A (ADVPACK.@)
*
...
...
dlls/advpack/install.c
View file @
46fe9448
...
...
@@ -31,6 +31,7 @@
#include "setupapi.h"
#include "advpub.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
advpack
);
...
...
@@ -41,6 +42,38 @@ WINE_DEFAULT_DEBUG_CHANNEL(advpack);
#define ADV_HRESULT(x) ((x & SPAPI_ERROR) ? HRESULT_FROM_SPAPI(x) : HRESULT_FROM_WIN32(x))
/* 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
token
=
*
params
;
if
(
!*
params
)
return
NULL
;
*
params
=
strchrW
(
*
params
,
separator
);
if
(
*
params
)
*
(
*
params
)
++
=
'\0'
;
if
(
!*
token
)
return
NULL
;
return
token
;
}
static
BOOL
is_full_path
(
LPWSTR
path
)
{
const
int
MIN_PATH_LEN
=
3
;
if
(
!
path
||
lstrlenW
(
path
)
<
MIN_PATH_LEN
)
return
FALSE
;
if
(
path
[
1
]
==
':'
||
(
path
[
0
]
==
'\\'
&&
path
[
1
]
==
'\\'
))
return
TRUE
;
return
FALSE
;
}
/* this structure very closely resembles parameters of RunSetupCommand() */
typedef
struct
{
...
...
@@ -253,14 +286,51 @@ HRESULT WINAPI LaunchINFSectionExA(HWND hWnd, HINSTANCE hInst, LPSTR cmdline, IN
* 'A' Always reboot.
* 'I' Reboot if needed (default).
* 'N' No reboot.
*
*
* BUGS
*
Unimplemented
.
*
Doesn't handle the reboot flag
.
*/
HRESULT
WINAPI
LaunchINFSectionExW
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPWSTR
cmdline
,
INT
show
)
{
FIXME
(
"(%p, %p, %s, %i): stub
\n
"
,
hWnd
,
hInst
,
debugstr_w
(
cmdline
),
show
);
return
E_FAIL
;
LPWSTR
cmdline_copy
,
cmdline_ptr
;
LPWSTR
flags
,
ptr
;
CABINFOW
cabinfo
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p, %p, %s, %d)
\n
"
,
hWnd
,
hInst
,
debugstr_w
(
cmdline
),
show
);
if
(
!
cmdline
)
return
E_INVALIDARG
;
cmdline_copy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
cmdline
)
+
1
)
*
sizeof
(
WCHAR
));
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
,
','
);
flags
=
get_parameter
(
&
cmdline_ptr
,
','
);
if
(
flags
)
cabinfo
.
dwFlags
=
atolW
(
flags
);
/* get the source path from the cab filename */
if
(
cabinfo
.
pszCab
&&
*
cabinfo
.
pszCab
)
{
if
(
!
is_full_path
(
cabinfo
.
pszCab
))
goto
done
;
lstrcpyW
(
cabinfo
.
szSrcPath
,
cabinfo
.
pszCab
);
ptr
=
strrchrW
(
cabinfo
.
szSrcPath
,
'\\'
);
*
(
++
ptr
)
=
'\0'
;
}
hr
=
ExecuteCabW
(
hWnd
,
&
cabinfo
,
NULL
);
done:
HeapFree
(
GetProcessHeap
(),
0
,
cmdline_copy
);
return
hr
;
}
static
HRESULT
launch_exe
(
LPCWSTR
cmd
,
LPCWSTR
dir
,
HANDLE
*
phEXE
)
...
...
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