Go to the source code of this file.
◆ LoadDWORDFromRegistry()
Definition at line 15 of file settings.c.
17{
21 DWORD cbData =
sizeof(dwValue);
22
23
24 *pdwValueData = 0;
25
26
28 L"Software\\Microsoft\\Osk",
29 0,
32
34 {
35
36 DPRINT(
"LoadDWORDFromRegistry(): Failed to open the application's key! (Error - %li)\n", lResult);
37 return lResult;
38 }
39
40
42 lpValueDataName,
43 0,
44 0,
46 &cbData);
47
49 {
50
51
52 DPRINT(
"LoadDWORDFromRegistry(): Failed to load the following value - \"%S\". (Error - %li)\n", lpValueDataName, lResult);
54 return lResult;
55 }
56
57
58 if (cbData != sizeof(dwValue))
59 {
60
61 DPRINT(
"LoadDWORDFromRegistry(): The buffer is too small to hold the data!\n");
64 }
65
66 *pdwValueData = dwValue;
68 return lResult;
69}
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define HKEY_CURRENT_USER
Referenced by LoadSettings().
◆ LoadSettings()
Definition at line 210 of file settings.c.
211{
214
215
220
221
224
225
227
228
231 Globals.bShowWarning = (dwValue != 0);
232
233
236 Globals.bIsEnhancedKeyboard = (dwValue != 0);
237
238
241 Globals.bSoundClick = (dwValue != 0);
242
243
247
248
252
253
256 Globals.bAlwaysOnTop = (dwValue != 0);
257
258
261
264
268}
LONG LoadStringFromRegistry(IN LPCWSTR lpValueDataName, OUT LPWSTR lpValueData, IN OUT LPUINT cchCount)
LONG LoadDWORDFromRegistry(IN LPCWSTR lpValueDataName, OUT PDWORD pdwValueData)
CLIPBOARD_GLOBALS Globals
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
◆ LoadStringFromRegistry()
Definition at line 73 of file settings.c.
76{
80
82
83
85 L"Software\\Microsoft\\Osk",
86 0,
89
91 {
92
93 DPRINT(
"LoadStringFromRegistry(): Failed to open the application's key! (Error - %li)\n", lResult);
94 return lResult;
95 }
96
97
99 lpValueDataName,
100 0,
101 0,
104
105
107 {
108
109
110 DPRINT(
"LoadStringFromRegistry(): Failed to load the following value - \"%S\". (Error - %li)\n", lpValueDataName, lResult);
112 return lResult;
113 }
114
116
118 return lResult;
119}
Referenced by LoadSettings().
◆ SaveDWORDToRegistry()
Definition at line 121 of file settings.c.
123{
126
127
129 L"Software\\Microsoft\\Osk",
130 0,
132 0,
137
139 {
140
141 DPRINT(
"SaveDWORDToRegistry(): Failed to create the application's key! (Error - %li)\n", lResult);
142 return lResult;
143 }
144
145
147 lpValueDataName,
148 0,
150 (
BYTE *)&dwValueData,
151 sizeof(dwValueData));
152
154 {
155
156 DPRINT(
"SaveDWORDToRegistry(): Failed to save the following value - \"%S\". (Error - %li)\n", lpValueDataName, lResult);
158 return lResult;
159 }
160
162 return lResult;
163}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Referenced by SaveSettings().
◆ SaveSettings()
Definition at line 270 of file settings.c.
271{
273
274
277
278
280
281
283
284
286
287
289
290
292
293
295
296
299}
LONG SaveDWORDToRegistry(IN LPCWSTR lpValueDataName, IN DWORD dwValueData)
LONG SaveStringToRegistry(IN LPCWSTR lpValueDataName, IN LPCWSTR lpValueData, IN UINT cchCount)
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
struct _WINDOWPLACEMENT WINDOWPLACEMENT
◆ SaveStringToRegistry()
Definition at line 165 of file settings.c.
168{
171
172
174 L"Software\\Microsoft\\Osk",
175 0,
177 0,
182
184 {
185
186 DPRINT(
"SaveStringToRegistry(): Failed to create the application's key! (Error - %li)\n", lResult);
187 return lResult;
188 }
189
190
192 lpValueDataName,
193 0,
196 cchCount *
sizeof(
WCHAR));
197
199 {
200
201 DPRINT(
"SaveStringToRegistry(): Failed to save the following value - \"%S\". (Error - %li)\n", lpValueDataName, lResult);
203 return lResult;
204 }
205
207 return lResult;
208}
Referenced by SaveSettings().