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
013e92c9
Commit
013e92c9
authored
Feb 22, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appwiz.cpl: List 32-bit applications on 64-bit platforms.
parent
178d39cc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
appwiz.c
dlls/appwiz.cpl/appwiz.c
+25
-25
No files found.
dlls/appwiz.cpl/appwiz.c
View file @
013e92c9
...
...
@@ -145,37 +145,26 @@ static void FreeAppInfo(APPINFO *info)
* Name : ReadApplicationsFromRegistry
* Description: Creates a linked list of uninstallable applications from the
* registry.
* Parameters : root - Which registry root to read from
(HKCU/HKLM)
* Parameters : root - Which registry root to read from
* Returns : TRUE if successful, FALSE otherwise
*/
static
BOOL
ReadApplicationsFromRegistry
(
HKEY
root
)
{
HKEY
hkey
Uninst
,
hkey
App
;
HKEY
hkeyApp
;
int
i
,
id
=
0
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
dwNoModify
,
dwType
,
value
;
WCHAR
subKeyName
[
256
];
WCHAR
key_app
[
MAX_STRING_LEN
];
WCHAR
*
p
,
*
command
;
WCHAR
*
command
;
APPINFO
*
info
=
NULL
;
LPWSTR
iconPtr
;
BOOL
ret
=
FALSE
;
if
(
RegOpenKeyExW
(
root
,
PathUninstallW
,
0
,
KEY_READ
,
&
hkeyUninst
)
!=
ERROR_SUCCESS
)
return
FALSE
;
lstrcpyW
(
key_app
,
PathUninstallW
);
lstrcatW
(
key_app
,
BackSlashW
);
p
=
key_app
+
lstrlenW
(
PathUninstallW
)
+
1
;
sizeOfSubKeyName
=
sizeof
(
subKeyName
)
/
sizeof
(
subKeyName
[
0
]);
for
(
i
=
0
;
RegEnumKeyExW
(
hkeyUnins
t
,
i
,
subKeyName
,
&
sizeOfSubKeyName
,
NULL
,
for
(
i
=
0
;
RegEnumKeyExW
(
roo
t
,
i
,
subKeyName
,
&
sizeOfSubKeyName
,
NULL
,
NULL
,
NULL
,
NULL
)
!=
ERROR_NO_MORE_ITEMS
;
++
i
)
{
lstrcpyW
(
p
,
subKeyName
);
RegOpenKeyExW
(
root
,
key_app
,
0
,
KEY_READ
,
&
hkeyApp
);
RegOpenKeyExW
(
root
,
subKeyName
,
0
,
KEY_READ
,
&
hkeyApp
);
displen
=
0
;
uninstlen
=
0
;
...
...
@@ -313,16 +302,11 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
sizeOfSubKeyName
=
sizeof
(
subKeyName
)
/
sizeof
(
subKeyName
[
0
]);
}
ret
=
TRUE
;
goto
end
;
return
TRUE
;
err:
RegCloseKey
(
hkeyApp
);
if
(
info
)
FreeAppInfo
(
info
);
end:
RegCloseKey
(
hkeyUninst
);
return
ret
;
return
FALSE
;
}
...
...
@@ -773,7 +757,9 @@ static HIMAGELIST AddListViewImageList(HWND hWnd)
*/
static
HIMAGELIST
ResetApplicationList
(
BOOL
bFirstRun
,
HWND
hWnd
,
HIMAGELIST
hImageList
)
{
static
const
BOOL
is_64bit
=
sizeof
(
void
*
)
>
sizeof
(
int
);
HWND
hWndListView
;
HKEY
hkey
;
hWndListView
=
GetDlgItem
(
hWnd
,
IDL_PROGRAMS
);
...
...
@@ -796,8 +782,22 @@ static HIMAGELIST ResetApplicationList(BOOL bFirstRun, HWND hWnd, HIMAGELIST hIm
/* now create the image list and add the applications to the listview */
hImageList
=
AddListViewImageList
(
hWndListView
);
ReadApplicationsFromRegistry
(
HKEY_LOCAL_MACHINE
);
ReadApplicationsFromRegistry
(
HKEY_CURRENT_USER
);
if
(
!
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
PathUninstallW
,
0
,
KEY_READ
,
&
hkey
))
{
ReadApplicationsFromRegistry
(
hkey
);
RegCloseKey
(
hkey
);
}
if
(
is_64bit
&&
!
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
PathUninstallW
,
0
,
KEY_READ
|
KEY_WOW64_32KEY
,
&
hkey
))
{
ReadApplicationsFromRegistry
(
hkey
);
RegCloseKey
(
hkey
);
}
if
(
!
RegOpenKeyExW
(
HKEY_CURRENT_USER
,
PathUninstallW
,
0
,
KEY_READ
,
&
hkey
))
{
ReadApplicationsFromRegistry
(
hkey
);
RegCloseKey
(
hkey
);
}
AddApplicationsToList
(
hWndListView
,
hImageList
);
UpdateButtons
(
hWnd
);
...
...
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