ReactOS 0.4.15-dev-8093-g3285f69
appwiz.c File Reference
#include "appwiz.h"
#include <shellapi.h>
#include <cpl.h>
#include <wine/unicode.h>
Include dependency graph for appwiz.c:

Go to the source code of this file.

Functions

static LONG start_params (const WCHAR *params, HWND hwnd_parent)
 
LONG CALLBACK CPlApplet (HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
 

Variables

HINSTANCE hApplet = NULL
 

Function Documentation

◆ CPlApplet()

LONG CALLBACK CPlApplet ( HWND  hwndCPl,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 40 of file appwiz.c.

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}
#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
#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
#define IDI_CPLSYSTEM
Definition: resource.h:4
#define L(x)
Definition: ntvdm.h:50
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2486
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
#define SW_SHOWNORMAL
Definition: winuser.h:770
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  dwReason,
LPVOID  lpvReserved 
)

Definition at line 77 of file appwiz.c.

78{
80
81 switch (dwReason)
82 {
86 hApplet = hinstDLL;
87 break;
88 }
89
90 return TRUE;
91}
DWORD dwReason
Definition: misc.cpp:154
HINSTANCE hApplet
Definition: appwiz.c:15
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_THREAD_ATTACH
Definition: compat.h:132
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
static IN DWORD IN LPVOID lpvReserved
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

◆ start_params()

static LONG start_params ( const WCHAR params,
HWND  hwnd_parent 
)
static

Definition at line 17 of file appwiz.c.

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}
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
#define WARN(fmt,...)
Definition: debug.h:115
static HWND hwnd_parent
Definition: dce.c:36
GLenum const GLfloat * params
Definition: glext.h:5645
#define debugstr_w
Definition: kernel32.h:32
#define strcmpW(s1, s2)
Definition: unicode.h:44

Referenced by CPlApplet().

Variable Documentation

◆ hApplet

HINSTANCE hApplet = NULL

Definition at line 15 of file appwiz.c.

Referenced by DllMain().