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)
...
@@ -145,37 +145,26 @@ static void FreeAppInfo(APPINFO *info)
* Name : ReadApplicationsFromRegistry
* Name : ReadApplicationsFromRegistry
* Description: Creates a linked list of uninstallable applications from the
* Description: Creates a linked list of uninstallable applications from the
* registry.
* 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
* Returns : TRUE if successful, FALSE otherwise
*/
*/
static
BOOL
ReadApplicationsFromRegistry
(
HKEY
root
)
static
BOOL
ReadApplicationsFromRegistry
(
HKEY
root
)
{
{
HKEY
hkey
Uninst
,
hkey
App
;
HKEY
hkeyApp
;
int
i
,
id
=
0
;
int
i
,
id
=
0
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
sizeOfSubKeyName
,
displen
,
uninstlen
;
DWORD
dwNoModify
,
dwType
,
value
;
DWORD
dwNoModify
,
dwType
,
value
;
WCHAR
subKeyName
[
256
];
WCHAR
subKeyName
[
256
];
WCHAR
key_app
[
MAX_STRING_LEN
];
WCHAR
*
command
;
WCHAR
*
p
,
*
command
;
APPINFO
*
info
=
NULL
;
APPINFO
*
info
=
NULL
;
LPWSTR
iconPtr
;
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
]);
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
)
NULL
,
NULL
,
NULL
)
!=
ERROR_NO_MORE_ITEMS
;
++
i
)
{
{
lstrcpyW
(
p
,
subKeyName
);
RegOpenKeyExW
(
root
,
subKeyName
,
0
,
KEY_READ
,
&
hkeyApp
);
RegOpenKeyExW
(
root
,
key_app
,
0
,
KEY_READ
,
&
hkeyApp
);
displen
=
0
;
displen
=
0
;
uninstlen
=
0
;
uninstlen
=
0
;
...
@@ -313,16 +302,11 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
...
@@ -313,16 +302,11 @@ static BOOL ReadApplicationsFromRegistry(HKEY root)
sizeOfSubKeyName
=
sizeof
(
subKeyName
)
/
sizeof
(
subKeyName
[
0
]);
sizeOfSubKeyName
=
sizeof
(
subKeyName
)
/
sizeof
(
subKeyName
[
0
]);
}
}
ret
=
TRUE
;
return
TRUE
;
goto
end
;
err:
err:
RegCloseKey
(
hkeyApp
);
RegCloseKey
(
hkeyApp
);
if
(
info
)
FreeAppInfo
(
info
);
if
(
info
)
FreeAppInfo
(
info
);
return
FALSE
;
end:
RegCloseKey
(
hkeyUninst
);
return
ret
;
}
}
...
@@ -773,7 +757,9 @@ static HIMAGELIST AddListViewImageList(HWND hWnd)
...
@@ -773,7 +757,9 @@ static HIMAGELIST AddListViewImageList(HWND hWnd)
*/
*/
static
HIMAGELIST
ResetApplicationList
(
BOOL
bFirstRun
,
HWND
hWnd
,
HIMAGELIST
hImageList
)
static
HIMAGELIST
ResetApplicationList
(
BOOL
bFirstRun
,
HWND
hWnd
,
HIMAGELIST
hImageList
)
{
{
static
const
BOOL
is_64bit
=
sizeof
(
void
*
)
>
sizeof
(
int
);
HWND
hWndListView
;
HWND
hWndListView
;
HKEY
hkey
;
hWndListView
=
GetDlgItem
(
hWnd
,
IDL_PROGRAMS
);
hWndListView
=
GetDlgItem
(
hWnd
,
IDL_PROGRAMS
);
...
@@ -796,8 +782,22 @@ static HIMAGELIST ResetApplicationList(BOOL bFirstRun, HWND hWnd, HIMAGELIST hIm
...
@@ -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 */
/* now create the image list and add the applications to the listview */
hImageList
=
AddListViewImageList
(
hWndListView
);
hImageList
=
AddListViewImageList
(
hWndListView
);
ReadApplicationsFromRegistry
(
HKEY_LOCAL_MACHINE
);
if
(
!
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
PathUninstallW
,
0
,
KEY_READ
,
&
hkey
))
ReadApplicationsFromRegistry
(
HKEY_CURRENT_USER
);
{
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
);
AddApplicationsToList
(
hWndListView
,
hImageList
);
UpdateButtons
(
hWnd
);
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