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
fd230c5d
Commit
fd230c5d
authored
Dec 07, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Run winebrowser directly instead of using ShellExecute.
parent
746679e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
+38
-3
addons.c
dlls/appwiz.cpl/addons.c
+38
-3
No files found.
dlls/appwiz.cpl/addons.c
View file @
fd230c5d
...
...
@@ -434,10 +434,45 @@ static DWORD WINAPI download_proc(PVOID arg)
return
0
;
}
static
INT_PTR
CALLBACK
installer_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
void
run_winebrowser
(
const
WCHAR
*
url
)
{
static
const
WCHAR
openW
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
PROCESS_INFORMATION
pi
;
STARTUPINFOW
si
;
WCHAR
app
[
MAX_PATH
];
LONG
len
,
url_len
;
WCHAR
*
args
;
BOOL
ret
;
static
const
WCHAR
winebrowserW
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'e'
,
'b'
,
'r'
,
'o'
,
'w'
,
's'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
url_len
=
strlenW
(
url
);
len
=
GetSystemDirectoryW
(
app
,
MAX_PATH
-
sizeof
(
winebrowserW
)
/
sizeof
(
WCHAR
));
memcpy
(
app
+
len
,
winebrowserW
,
sizeof
(
winebrowserW
));
len
+=
sizeof
(
winebrowserW
)
/
sizeof
(
WCHAR
)
-
1
;
args
=
heap_alloc
((
len
+
1
+
url_len
)
*
sizeof
(
WCHAR
));
if
(
!
args
)
return
;
memcpy
(
args
,
app
,
len
*
sizeof
(
WCHAR
));
args
[
len
++
]
=
' '
;
memcpy
(
args
+
len
,
url
,
(
url_len
+
1
)
*
sizeof
(
WCHAR
));
TRACE
(
"starting %s
\n
"
,
debugstr_w
(
args
));
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcessW
(
app
,
args
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
heap_free
(
args
);
if
(
ret
)
{
CloseHandle
(
pi
.
hThread
);
CloseHandle
(
pi
.
hProcess
);
}
}
static
INT_PTR
CALLBACK
installer_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
msg
)
{
case
WM_INITDIALOG
:
ShowWindow
(
GetDlgItem
(
hwnd
,
ID_DWL_PROGRESS
),
SW_HIDE
);
...
...
@@ -450,7 +485,7 @@ static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case
NM_CLICK
:
case
NM_RETURN
:
if
(
wParam
==
ID_DWL_STATUS
)
ShellExecuteW
(
NULL
,
openW
,
((
NMLINK
*
)
lParam
)
->
item
.
szUrl
,
NULL
,
NULL
,
SW_SHOW
);
run_winebrowser
(((
NMLINK
*
)
lParam
)
->
item
.
szUrl
);
break
;
}
break
;
...
...
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