ReactOS 0.4.16-dev-1105-gafe29ee
advanced.c File Reference
#include "precomp.h"
#include "pstypes.h"
Include dependency graph for advanced.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 

Functions

static VOID OnOK (HWND hwndDlg)
 
static VOID OnInitSysSettingsDialog (HWND hwndDlg)
 
INT_PTR CALLBACK SysSettingsDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
INT_PTR CALLBACK AdvancedPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Variables

static TCHAR BugLink [] = _T("http://jira.reactos.org/")
 
static TCHAR ReportAsWorkstationKey [] = _T("SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version")
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 12 of file advanced.c.

Function Documentation

◆ AdvancedPageProc()

INT_PTR CALLBACK AdvancedPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 119 of file advanced.c.

123{
125
126 switch (uMsg)
127 {
128 case WM_INITDIALOG:
129 break;
130
131 case WM_COMMAND:
132 {
133 switch (LOWORD(wParam))
134 {
135 case IDC_PERFOR:
138 hwndDlg,
140 break;
141
142 case IDC_USERPROFILE:
145 hwndDlg,
147 break;
148
149 case IDC_STAREC:
152 hwndDlg,
154 break;
155
156 case IDC_SYSSETTINGS:
159 hwndDlg,
161 break;
162
163 case IDC_ENVVAR:
166 hwndDlg,
168 break;
169
170 case IDC_ERRORREPORT:
172 _T("open"),
173 BugLink,
174 NULL,
175 NULL,
177 break;
178 }
179 }
180
181 break;
182 }
183
184 return FALSE;
185}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
static TCHAR BugLink[]
Definition: advanced.c:15
INT_PTR CALLBACK SysSettingsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:85
INT_PTR CALLBACK EnvironmentDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: environment.c:1823
INT_PTR CALLBACK UserProfileDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: userprofile.c:810
INT_PTR CALLBACK VirtMemDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: virtmem.c:821
INT_PTR CALLBACK StartRecDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: startrec.c:695
#define IDD_SYSSETTINGS
Definition: resource.h:102
#define IDC_USERPROFILE
Definition: resource.h:98
#define IDC_ERRORREPORT
Definition: resource.h:99
#define IDC_ENVVAR
Definition: resource.h:95
#define IDD_USERPROFILE
Definition: resource.h:106
#define IDD_ENVIRONMENT_VARIABLES
Definition: resource.h:128
#define IDC_SYSSETTINGS
Definition: resource.h:94
#define IDD_VIRTMEM
Definition: resource.h:156
#define IDC_STAREC
Definition: resource.h:96
#define IDD_STARTUPRECOVERY
Definition: resource.h:173
#define IDC_PERFOR
Definition: resource.h:97
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define MAKEINTRESOURCE(i)
Definition: ntverrsrc.c:25
#define LOWORD(l)
Definition: pedump.c:82
#define ShellExecute
Definition: shellapi.h:733
#define _T(x)
Definition: vfdio.h:22
#define SW_SHOWNORMAL
Definition: winuser.h:781
#define WM_COMMAND
Definition: winuser.h:1751
#define WM_INITDIALOG
Definition: winuser.h:1750
#define DialogBox
Definition: winuser.h:5781

◆ OnInitSysSettingsDialog()

static VOID OnInitSysSettingsDialog ( HWND  hwndDlg)
static

Definition at line 53 of file advanced.c.

54{
55 HKEY hKey;
56 DWORD dwVal = 0;
57 DWORD dwType = REG_DWORD;
58 DWORD cbData = sizeof(DWORD);
59 BOOL ReportAsWorkstation = SharedUserData->NtProductType == VER_NT_WORKSTATION;
60
63 0,
66 {
68 _T("ReportAsWorkstation"),
69 0,
70 &dwType,
71 (LPBYTE)&dwVal,
72 &cbData) == ERROR_SUCCESS)
73 {
74 if (cbData == sizeof(DWORD))
75 ReportAsWorkstation = dwVal != FALSE;
76 }
77
79 }
81 ReportAsWorkstation ? BST_CHECKED : BST_UNCHECKED, 0);
82}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
static TCHAR ReportAsWorkstationKey[]
Definition: advanced.c:16
#define IDC_REPORTASWORKSTATION
Definition: resource.h:103
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
#define KEY_READ
Definition: nt_native.h:1023
#define DWORD
Definition: nt_native.h:44
#define REG_DWORD
Definition: sdbapi.c:596
#define SharedUserData
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define RegOpenKeyEx
Definition: winreg.h:520
#define RegQueryValueEx
Definition: winreg.h:524
#define BST_UNCHECKED
Definition: winuser.h:199
#define BM_SETCHECK
Definition: winuser.h:1932
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define VER_NT_WORKSTATION

Referenced by SysSettingsDlgProc().

◆ OnOK()

static VOID OnOK ( HWND  hwndDlg)
static

Definition at line 20 of file advanced.c.

21{
22 HKEY hKey;
23 DWORD ReportAsWorkstation;
24
25 ReportAsWorkstation = (SendDlgItemMessageW(hwndDlg,
28 0,
29 0) == BST_CHECKED);
30
33 0,
34 NULL,
35 0,
37 NULL,
38 &hKey,
40 {
42 _T("ReportAsWorkstation"),
43 0,
45 (LPBYTE)&ReportAsWorkstation,
46 sizeof(DWORD));
47
49 }
50}
#define KEY_WRITE
Definition: nt_native.h:1031
#define RegSetValueEx
Definition: winreg.h:533
#define RegCreateKeyEx
Definition: winreg.h:501
#define BM_GETCHECK
Definition: winuser.h:1929

Referenced by SysSettingsDlgProc().

◆ SysSettingsDlgProc()

INT_PTR CALLBACK SysSettingsDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 85 of file advanced.c.

89{
91
92 switch (uMsg)
93 {
94 case WM_INITDIALOG:
96 break;
97
98 case WM_COMMAND:
99 switch (LOWORD(wParam))
100 {
101 case IDOK:
102 OnOK(hwndDlg);
103 EndDialog(hwndDlg, 0);
104 return TRUE;
105
106 case IDCANCEL:
107 EndDialog(hwndDlg, 0);
108 return TRUE;
109 }
110 break;
111 }
112
113 return FALSE;
114}
#define TRUE
Definition: types.h:120
static VOID OnInitSysSettingsDialog(HWND hwndDlg)
Definition: advanced.c:53
static VOID OnOK(HWND hwndDlg)
Definition: advanced.c:20
#define IDCANCEL
Definition: winuser.h:842
#define IDOK
Definition: winuser.h:841
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by AdvancedPageProc().

Variable Documentation

◆ BugLink

TCHAR BugLink[] = _T("http://jira.reactos.org/")
static

Definition at line 15 of file advanced.c.

Referenced by AdvancedPageProc().

◆ ReportAsWorkstationKey

TCHAR ReportAsWorkstationKey[] = _T("SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version")
static

Definition at line 16 of file advanced.c.

Referenced by OnInitSysSettingsDialog(), and OnOK().