ReactOS  0.4.13-dev-66-gc714b7f
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 41 of file appwiz.c.

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 }
#define TRUE
Definition: types.h:120
Definition: cpl.h:24
#define IDI_CPLSYSTEM
Definition: resource.h:4
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
#define CPL_DBLCLK
Definition: cpl.h:16
static LONG start_params(const WCHAR *params, HWND hwnd_parent)
Definition: appwiz.c:17
smooth NULL
Definition: ftsmooth.c:416
#define IDS_CPLSYSTEMNAME
Definition: resource.h:23
__wchar_t WCHAR
Definition: xmlstorage.h:180
#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
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
#define IDS_CPLSYSTEMDESCRIPTION
Definition: resource.h:24
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

◆ DllMain()

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

Definition at line 78 of file appwiz.c.

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
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define DLL_THREAD_ATTACH
Definition: compat.h:121
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static IN DWORD IN LPVOID lpvReserved
DWORD dwReason
Definition: misc.cpp:154
smooth NULL
Definition: ftsmooth.c:416
HINSTANCE hApplet
Definition: appwiz.c:15
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1897

◆ start_params()

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

Definition at line 17 of file appwiz.c.

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 }
#define TRUE
Definition: types.h:120
#define WARN(fmt,...)
Definition: debug.h:111
GLenum const GLfloat * params
Definition: glext.h:5645
#define debugstr_w
Definition: kernel32.h:32
static HWND hwnd_parent
Definition: dce.c:36
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL install_addon(addon_t addon_type, HWND hwnd_parent)
Definition: addons.c:422
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229

Referenced by CPlApplet().

Variable Documentation

◆ hApplet

HINSTANCE hApplet = NULL

Definition at line 15 of file appwiz.c.

Referenced by DllMain().