ReactOS  0.4.13-dev-464-g6b95727
appwiz.c
Go to the documentation of this file.
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 #include <shellapi.h>
12 #include <cpl.h>
13 #include <wine/unicode.h>
14 
16 
18 {
19  static const WCHAR install_geckoW[] = {'i','n','s','t','a','l','l','_','g','e','c','k','o',0};
20  static const WCHAR install_monoW[] = {'i','n','s','t','a','l','l','_','m','o','n','o',0};
21 
22  if(!params)
23  return FALSE;
24 
25  if(!strcmpW(params, install_geckoW)) {
27  return TRUE;
28  }
29 
30  if(!strcmpW(params, install_monoW)) {
32  return TRUE;
33  }
34 
35  WARN("unknown param %s\n", debugstr_w(params));
36  return FALSE;
37 }
38 
39 /* Control Panel Callback */
41 CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
42 {
43  CPLINFO *CPlInfo;
44 
45  switch (uMsg)
46  {
47  case CPL_INIT:
48  return TRUE;
49 
50  case CPL_GETCOUNT:
51  return 1;
52 
53  case CPL_STARTWPARMSW:
54  return start_params((const WCHAR *)lParam2, hwndCPl);
55 
56  case CPL_INQUIRE:
57  CPlInfo = (CPLINFO*)lParam2;
58  CPlInfo->lData = 0;
59  CPlInfo->idIcon = IDI_CPLSYSTEM;
60  CPlInfo->idName = IDS_CPLSYSTEMNAME;
62  break;
63 
64  case CPL_DBLCLK:
66  NULL,
67  L"rapps.exe",
68  NULL,
69  NULL,
70  1);
71  break;
72  }
73 
74  return FALSE;
75 }
76 
79 {
81 
82  switch (dwReason)
83  {
84  case DLL_PROCESS_ATTACH:
85  case DLL_THREAD_ATTACH:
87  hApplet = hinstDLL;
88  break;
89  }
90 
91  return TRUE;
92 }
#define TRUE
Definition: types.h:120
Definition: cpl.h:24
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define DLL_THREAD_ATTACH
Definition: compat.h:121
#define IDI_CPLSYSTEM
Definition: resource.h:4
#define WARN(fmt,...)
Definition: debug.h:111
#define CALLBACK
Definition: compat.h:27
int idInfo
Definition: cpl.h:27
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static IN DWORD IN LPVOID lpvReserved
int idIcon
Definition: cpl.h:25
#define CPL_DBLCLK
Definition: cpl.h:16
LONG CALLBACK CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: appwiz.c:41
DWORD dwReason
Definition: misc.cpp:154
static LONG start_params(const WCHAR *params, HWND hwnd_parent)
Definition: appwiz.c:17
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
static HWND hwnd_parent
Definition: dce.c:36
#define IDS_CPLSYSTEMNAME
Definition: resource.h:23
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CPL_STARTWPARMSW
Definition: cpl.h:21
#define CPL_INIT
Definition: cpl.h:12
#define CPL_INQUIRE
Definition: cpl.h:14
static const WCHAR L[]
Definition: oid.c:1250
HINSTANCE hApplet
Definition: appwiz.c:15
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: appwiz.c:78
BOOL install_addon(addon_t addon_type, HWND hwnd_parent)
Definition: addons.c:422
#define IDS_CPLSYSTEMDESCRIPTION
Definition: resource.h:24
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1897
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2236
#define CPL_GETCOUNT
Definition: cpl.h:13