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
2c9774f0
Commit
2c9774f0
authored
Sep 20, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: Allow cancelling download of addons.
parent
3b5fb27f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
addons.c
dlls/appwiz.cpl/addons.c
+18
-2
No files found.
dlls/appwiz.cpl/addons.c
View file @
2c9774f0
...
...
@@ -106,6 +106,7 @@ static const addon_info_t *addon;
static
HWND
install_dialog
=
NULL
;
static
LPWSTR
url
=
NULL
;
static
IBinding
*
dwl_binding
;
static
WCHAR
*
(
CDECL
*
p_wine_get_dos_file_name
)(
const
char
*
);
static
const
WCHAR
kernel32_dllW
[]
=
{
'k'
,
'e'
,
'r'
,
'n'
,
'e'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
...
...
@@ -185,6 +186,8 @@ static enum install_res install_file(const WCHAR *file_name)
{
ULONG
res
;
EnableWindow
(
GetDlgItem
(
install_dialog
,
IDCANCEL
),
0
);
res
=
MsiInstallProductW
(
file_name
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
{
ERR
(
"MsiInstallProduct failed: %u
\n
"
,
res
);
...
...
@@ -437,6 +440,10 @@ static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface,
DWORD
dwReserved
,
IBinding
*
pib
)
{
set_status
(
IDS_DOWNLOADING
);
IBinding_AddRef
(
pib
);
dwl_binding
=
pib
;
return
S_OK
;
}
...
...
@@ -468,8 +475,16 @@ static HRESULT WINAPI InstallCallback_OnProgress(IBindStatusCallback *iface, ULO
static
HRESULT
WINAPI
InstallCallback_OnStopBinding
(
IBindStatusCallback
*
iface
,
HRESULT
hresult
,
LPCWSTR
szError
)
{
if
(
dwl_binding
)
{
IBinding_Release
(
dwl_binding
);
dwl_binding
=
NULL
;
}
if
(
FAILED
(
hresult
))
{
ERR
(
"Binding failed %08x
\n
"
,
hresult
);
if
(
hresult
==
E_ABORT
)
TRACE
(
"Binding aborted
\n
"
);
else
ERR
(
"Binding failed %08x
\n
"
,
hresult
);
return
S_OK
;
}
...
...
@@ -660,13 +675,14 @@ static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
case
WM_COMMAND
:
switch
(
wParam
)
{
case
IDCANCEL
:
if
(
dwl_binding
)
IBinding_Abort
(
dwl_binding
);
EndDialog
(
hwnd
,
0
);
return
FALSE
;
case
ID_DWL_INSTALL
:
ShowWindow
(
GetDlgItem
(
hwnd
,
ID_DWL_PROGRESS
),
SW_SHOW
);
EnableWindow
(
GetDlgItem
(
hwnd
,
ID_DWL_INSTALL
),
0
);
EnableWindow
(
GetDlgItem
(
hwnd
,
IDCANCEL
),
0
);
/* FIXME */
CloseHandle
(
CreateThread
(
NULL
,
0
,
download_proc
,
NULL
,
0
,
NULL
));
return
FALSE
;
}
...
...
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