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
9e6a7661
Commit
9e6a7661
authored
Jul 02, 2008
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Check registry entry for cpl files (in standard control panel).
parent
f9e3f81d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
control.c
dlls/shell32/control.c
+33
-0
No files found.
dlls/shell32/control.c
View file @
9e6a7661
...
...
@@ -27,6 +27,7 @@
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "wine/winbase16.h"
#include "wownt32.h"
#include "wine/debug.h"
...
...
@@ -319,14 +320,42 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
}
}
static
void
Control_RegisterRegistryApplets
(
HWND
hWnd
,
CPanel
*
panel
,
HKEY
hkey_root
,
LPCWSTR
szRepPath
)
{
WCHAR
name
[
MAX_PATH
];
WCHAR
value
[
MAX_PATH
];
HKEY
hkey
;
if
(
RegOpenKeyW
(
hkey_root
,
szRepPath
,
&
hkey
)
==
ERROR_SUCCESS
)
{
int
idx
=
0
;
for
(;;
++
idx
)
{
DWORD
nameLen
=
MAX_PATH
;
DWORD
valueLen
=
MAX_PATH
;
if
(
RegEnumValueW
(
hkey
,
idx
,
name
,
&
nameLen
,
NULL
,
NULL
,
(
LPBYTE
)
&
value
,
&
valueLen
)
!=
ERROR_SUCCESS
)
break
;
Control_LoadApplet
(
hWnd
,
value
,
panel
);
}
RegCloseKey
(
hkey
);
}
}
static
void
Control_DoWindow
(
CPanel
*
panel
,
HWND
hWnd
,
HINSTANCE
hInst
)
{
HANDLE
h
;
WIN32_FIND_DATAW
fd
;
WCHAR
buffer
[
MAX_PATH
];
static
const
WCHAR
wszAllCpl
[]
=
{
'*'
,
'.'
,
'c'
,
'p'
,
'l'
,
0
};
static
const
WCHAR
wszRegPath
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'C'
,
'p'
,
'l'
,
's'
,
0
};
WCHAR
*
p
;
/* first add .cpl files in the system directory */
GetSystemDirectoryW
(
buffer
,
MAX_PATH
);
p
=
buffer
+
strlenW
(
buffer
);
*
p
++
=
'\\'
;
...
...
@@ -340,6 +369,10 @@ static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst)
FindClose
(
h
);
}
/* now check for cpls in the registry */
Control_RegisterRegistryApplets
(
hWnd
,
panel
,
HKEY_LOCAL_MACHINE
,
wszRegPath
);
Control_RegisterRegistryApplets
(
hWnd
,
panel
,
HKEY_CURRENT_USER
,
wszRegPath
);
Control_DoInterface
(
panel
,
hWnd
,
hInst
);
}
...
...
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