ReactOS 0.4.15-dev-7889-g76290a6
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 if (!params)
20 return FALSE;
21
22 if (!strcmpW(params, L"install_gecko"))
23 {
25 return TRUE;
26 }
27
28 if (!strcmpW(params, L"install_mono"))
29 {
31 return TRUE;
32 }
33
34 WARN("unknown param %s\n", debugstr_w(params));
35 return FALSE;
36}
37
38/* Control Panel Callback */
40CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
41{
42 CPLINFO *CPlInfo;
43
44 switch (uMsg)
45 {
46 case CPL_INIT:
47 return TRUE;
48
49 case CPL_GETCOUNT:
50 return 1;
51
53 return start_params((const WCHAR *)lParam2, hwndCPl);
54
55 case CPL_INQUIRE:
56 CPlInfo = (CPLINFO*)lParam2;
57 CPlInfo->lData = 0;
58 CPlInfo->idIcon = IDI_CPLSYSTEM;
59 CPlInfo->idName = IDS_CPLSYSTEMNAME;
61 break;
62
63 case CPL_DBLCLK:
65 NULL,
66 L"rapps.exe",
67 L"/appwiz",
68 NULL,
70 break;
71 }
72
73 return FALSE;
74}
75
78{
80
81 switch (dwReason)
82 {
86 hApplet = hinstDLL;
87 break;
88 }
89
90 return TRUE;
91}
BOOL install_addon(addon_t addon_type, HWND hwnd_parent)
Definition: addons.c:450
@ ADDON_GECKO
Definition: appwiz.h:58
@ ADDON_MONO
Definition: appwiz.h:59
DWORD dwReason
Definition: misc.cpp:154
#define WARN(fmt,...)
Definition: debug.h:112
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_STARTWPARMSW
Definition: cpl.h:21
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
static HWND hwnd_parent
Definition: dce.c:36
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDS_CPLSYSTEMNAME
Definition: resource.h:23
#define IDS_CPLSYSTEMDESCRIPTION
Definition: resource.h:24
static LONG start_params(const WCHAR *params, HWND hwnd_parent)
Definition: appwiz.c:17
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: appwiz.c:77
HINSTANCE hApplet
Definition: appwiz.c:15
#define IDI_CPLSYSTEM
Definition: resource.h:4
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define CALLBACK
Definition: compat.h:35
#define DLL_THREAD_ATTACH
Definition: compat.h:132
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum const GLfloat * params
Definition: glext.h:5645
#define debugstr_w
Definition: kernel32.h:32
static IN DWORD IN LPVOID lpvReserved
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define strcmpW(s1, s2)
Definition: unicode.h:38
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2402
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
#define SW_SHOWNORMAL
Definition: winuser.h:770
__wchar_t WCHAR
Definition: xmlstorage.h:180