ReactOS
0.4.16-dev-959-g2ec3a19
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
cmicpl.cpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2006-2008 dogbert <dogber1@gmail.com>
3
All rights reserved.
4
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions
7
are met:
8
1. Redistributions of source code must retain the above copyright
9
notice, this list of conditions and the following disclaimer.
10
2. Redistributions in binary form must reproduce the above copyright
11
notice, this list of conditions and the following disclaimer in the
12
documentation and/or other materials provided with the distribution.
13
3. The name of the author may not be used to endorse or promote products
14
derived from this software without specific prior written permission.
15
16
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#define WIN32_LEAN_AND_MEAN
29
#include <windows.h>
30
#include <
shellapi.h
>
31
#include <tchar.h>
32
#include <
cpl.h
>
33
#include "
resource.h
"
34
35
BOOL
APIENTRY
DllMain
(
HANDLE
hModule
,
ULONG
gna,
LPVOID
lpReserved
)
36
{
37
return
TRUE
;
38
}
39
40
BOOL
execControlPanel
()
41
{
42
TCHAR
szSysDir[1024];
43
if
(!
GetSystemDirectory
(szSysDir,
sizeof
(szSysDir) /
sizeof
(
TCHAR
))) {
44
return
FALSE
;
45
}
46
_tcscat
(szSysDir,
_T
(
"\\cmicontrol.exe"
));
//unsafe
47
ShellExecute
(
NULL
,
_T
(
"open"
), szSysDir,
NULL
,
NULL
,
SW_SHOWNORMAL
);
48
return
TRUE
;
49
}
50
51
LONG
APIENTRY
CPlApplet
(
HWND
hWnd
,
UINT
uMsg,
LPARAM
lParam1,
LPARAM
lParam2)
52
{
53
switch
(uMsg)
54
{
55
case
CPL_INIT
:
56
return
TRUE
;
57
58
case
CPL_GETCOUNT
:
59
return
1;
60
61
case
CPL_INQUIRE
:
62
{
63
LPCPLINFO
pCplInfo = (
LPCPLINFO
)lParam2;
64
65
if
(!pCplInfo) {
66
return
TRUE
;
67
}
68
69
if
((
UINT
)lParam1 == 0) {
70
pCplInfo->
idIcon
=
IDI_CPLICON
;
71
pCplInfo->
idName
=
IDS_CPLNAME
;
72
pCplInfo->
idInfo
=
IDS_CPLINFO
;
73
}
74
break
;
75
}
76
77
case
CPL_NEWINQUIRE
:
78
break
;
79
80
case
CPL_DBLCLK
:
81
case
CPL_STARTWPARMS
:
82
if
((
UINT
)lParam1 == 0) {
83
if
(!
execControlPanel
()) {
84
return
TRUE
;
85
}
86
}
87
break
;
88
case
CPL_EXIT
:
89
break
;
90
91
default
:
92
break
;
93
}
94
95
return
0;
96
}
97
lpReserved
static DWORD const LPVOID const lpReserved
Definition:
appcrt_dllmain.cpp:58
hWnd
HWND hWnd
Definition:
settings.c:17
DllMain
BOOL APIENTRY DllMain(HANDLE hModule, ULONG gna, LPVOID lpReserved)
Definition:
cmicpl.cpp:35
execControlPanel
BOOL execControlPanel()
Definition:
cmicpl.cpp:40
cpl.h
CPL_INQUIRE
#define CPL_INQUIRE
Definition:
cpl.h:14
CPL_DBLCLK
#define CPL_DBLCLK
Definition:
cpl.h:16
CPL_STARTWPARMS
#define CPL_STARTWPARMS
Definition:
cpl.h:54
CPL_INIT
#define CPL_INIT
Definition:
cpl.h:12
CPL_EXIT
#define CPL_EXIT
Definition:
cpl.h:18
CPL_GETCOUNT
#define CPL_GETCOUNT
Definition:
cpl.h:13
LPCPLINFO
struct tagCPLINFO * LPCPLINFO
CPL_NEWINQUIRE
#define CPL_NEWINQUIRE
Definition:
cpl.h:19
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
IDS_CPLNAME
#define IDS_CPLNAME
Definition:
resource.h:8
IDI_CPLICON
#define IDI_CPLICON
Definition:
resource.h:4
APIENTRY
#define APIENTRY
Definition:
api.h:79
hModule
HMODULE hModule
Definition:
animate.c:44
IDS_CPLINFO
#define IDS_CPLINFO
Definition:
resource.h:30
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
_tcscat
#define _tcscat
Definition:
tchar.h:622
void
Definition:
nsiface.idl:2307
UINT
unsigned int UINT
Definition:
ndis.h:50
LONG
long LONG
Definition:
pedump.c:60
shellapi.h
ShellExecute
#define ShellExecute
Definition:
shellapi.h:716
CPlApplet
Definition:
cpanel.h:41
tagCPLINFO
Definition:
cpl.h:24
tagCPLINFO::idName
int idName
Definition:
cpl.h:26
tagCPLINFO::idInfo
int idInfo
Definition:
cpl.h:27
tagCPLINFO::idIcon
int idIcon
Definition:
cpl.h:25
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
_T
#define _T(x)
Definition:
vfdio.h:22
resource.h
GetSystemDirectory
#define GetSystemDirectory
Definition:
winbase.h:3873
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
SW_SHOWNORMAL
#define SW_SHOWNORMAL
Definition:
winuser.h:773
TCHAR
char TCHAR
Definition:
xmlstorage.h:189
drivers
wdm
audio
drivers
CMIDriver
cpl
cmicpl.cpp
Generated on Sun Apr 6 2025 06:08:52 for ReactOS by
1.9.6