[SYSDM]
[reactos.git] / reactos / dll / cpl / appwiz / appwiz.c
1 /*
2 * PROJECT: ReactOS Software Control Panel
3 * FILE: dll/cpl/appwiz/appwiz.c
4 * PURPOSE: ReactOS Software Control Panel
5 * PROGRAMMERS: Gero Kuehn (reactos.filter@gkware.com)
6 * Dmitry Chapyshev (dmitry@reactos.org)
7 */
8
9 #include "appwiz.h"
10
11 HINSTANCE hApplet = NULL;
12
13 /* Control Panel Callback */
14 LONG CALLBACK
15 CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
16 {
17 CPLINFO *CPlInfo;
18
19 switch (uMsg)
20 {
21 case CPL_INIT:
22 return TRUE;
23
24 case CPL_GETCOUNT:
25 return 1;
26
27 case CPL_INQUIRE:
28 CPlInfo = (CPLINFO*)lParam2;
29 CPlInfo->lData = 0;
30 CPlInfo->idIcon = IDI_CPLSYSTEM;
31 CPlInfo->idName = IDS_CPLSYSTEMNAME;
32 CPlInfo->idInfo = IDS_CPLSYSTEMDESCRIPTION;
33 break;
34
35 case CPL_DBLCLK:
36 ShellExecute(NULL,
37 NULL,
38 _T("rapps.exe"),
39 NULL,
40 NULL,
41 1);
42 break;
43 }
44
45 return FALSE;
46 }
47
48 BOOL WINAPI
49 DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
50 {
51 UNREFERENCED_PARAMETER(lpvReserved);
52
53 switch (dwReason)
54 {
55 case DLL_PROCESS_ATTACH:
56 case DLL_THREAD_ATTACH:
57 CoInitialize(NULL);
58 hApplet = hinstDLL;
59 break;
60 }
61
62 return TRUE;
63 }