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
e7ea9b65
Commit
e7ea9b65
authored
Jul 05, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Wine debugging API. Fixed MessageBox loop.
parent
af0d2067
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
main.c
programs/uninstaller/main.c
+12
-17
No files found.
programs/uninstaller/main.c
View file @
e7ea9b65
...
...
@@ -29,6 +29,9 @@
#include <windows.h>
#include "main.h"
#include "regstr.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uninstaller
);
/* Work around a Wine bug which defines handles as UINT rather than LPVOID */
#ifdef WINE_STRICT
...
...
@@ -37,14 +40,6 @@
#define NULL_HANDLE 0
#endif
#undef DUMB_DEBUG
#ifdef DUMB_DEBUG
#include <stdio.h>
#define DEBUG(x...) fprintf(stderr,x)
#else
#define DEBUG(x...)
#endif
/* use multi-select listbox */
#undef USE_MULTIPLESEL
...
...
@@ -238,7 +233,7 @@ int FetchUninstallInformation(void)
entries
[
numentries
-
1
].
active
=
0
;
RegQueryValueEx
(
hkeyApp
,
REGSTR_VAL_UNINSTALLER_COMMANDLINE
,
0
,
0
,
entries
[
numentries
-
1
].
command
,
&
uninstlen
);
DEBUG
(
"allocated entry #%d: '%s' ('%s'), '%s'
\n
"
,
numentries
,
entries
[
numentries
-
1
].
key
,
entries
[
numentries
-
1
].
descr
,
entries
[
numentries
-
1
].
command
);
WINE_TRACE
(
"allocated entry #%d: '%s' ('%s'), '%s'
\n
"
,
numentries
,
entries
[
numentries
-
1
].
key
,
entries
[
numentries
-
1
].
descr
,
entries
[
numentries
-
1
].
command
);
}
RegCloseKey
(
hkeyApp
);
}
...
...
@@ -263,7 +258,7 @@ void UninstallProgram(void)
{
if
(
!
(
entries
[
i
].
active
))
/* don't uninstall this one */
continue
;
DEBUG
(
"uninstalling '%s'
\n
"
,
entries
[
i
].
descr
);
WINE_TRACE
(
"uninstalling '%s'
\n
"
,
entries
[
i
].
descr
);
memset
(
&
si
,
0
,
sizeof
(
STARTUPINFO
));
si
.
cb
=
sizeof
(
STARTUPINFO
);
si
.
wShowWindow
=
SW_NORMAL
;
...
...
@@ -272,7 +267,7 @@ void UninstallProgram(void)
{
/* wait for the process to exit */
WaitForSingleObject
(
info
.
hProcess
,
INFINITE
);
res
=
GetExitCodeProcess
(
info
.
hProcess
,
&
exit_code
);
DEBUG
(
"%d: %08lx
\n
"
,
res
,
exit_code
);
WINE_TRACE
(
"%d: %08lx
\n
"
,
res
,
exit_code
);
#ifdef DEL_REG_KEY
/* delete the program's uninstall entry */
if
(
RegOpenKeyEx
(
HKEY_LOCAL_MACHINE
,
REGSTR_PATH_UNINSTALL
,
...
...
@@ -289,7 +284,7 @@ void UninstallProgram(void)
MessageBox
(
0
,
errormsg
,
appname
,
MB_OK
);
}
}
DEBUG
(
"finished uninstall phase.
\n
"
);
WINE_TRACE
(
"finished uninstall phase.
\n
"
);
list_need_update
=
1
;
}
...
...
@@ -372,6 +367,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case
WM_PAINT
:
{
hdc
=
BeginPaint
(
hWnd
,
&
ps
);
if
(
list_need_update
)
{
int
prevsel
;
...
...
@@ -385,16 +381,15 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
SendMessage
(
hwndList
,
WM_SETREDRAW
,
FALSE
,
0
);
for
(
i
=
0
;
i
<
numentries
;
i
++
)
{
DEBUG
(
"adding '%s'
\n
"
,
entries
[
i
].
descr
);
WINE_TRACE
(
"adding '%s'
\n
"
,
entries
[
i
].
descr
);
SendMessage
(
hwndList
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
entries
[
i
].
descr
);
}
DEBUG
(
"setting prevsel %d
\n
"
,
prevsel
);
WINE_TRACE
(
"setting prevsel %d
\n
"
,
prevsel
);
if
(
prevsel
!=
-
1
)
SendMessage
(
hwndList
,
LB_SETCURSEL
,
prevsel
,
0
);
SendMessage
(
hwndList
,
WM_SETREDRAW
,
TRUE
,
0
);
list_need_update
=
0
;
}
hdc
=
BeginPaint
(
hWnd
,
&
ps
);
EndPaint
(
hWnd
,
&
ps
);
return
0
;
}
...
...
@@ -414,11 +409,11 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
if
(
oldsel
!=
-
1
)
{
entries
[
oldsel
].
active
^=
1
;
/* toggle */
DEBUG
(
"toggling %d old '%s'
\n
"
,
entries
[
oldsel
].
active
,
entries
[
oldsel
].
descr
);
WINE_TRACE
(
"toggling %d old '%s'
\n
"
,
entries
[
oldsel
].
active
,
entries
[
oldsel
].
descr
);
}
#endif
entries
[
sel
].
active
^=
1
;
/* toggle */
DEBUG
(
"toggling %d '%s'
\n
"
,
entries
[
sel
].
active
,
entries
[
sel
].
descr
);
WINE_TRACE
(
"toggling %d '%s'
\n
"
,
entries
[
sel
].
active
,
entries
[
sel
].
descr
);
SendMessage
(
hwndEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
entries
[
sel
].
command
);
oldsel
=
sel
;
}
...
...
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