#include "precomp.h"
#include "utils.h"
#include "regutils.h"
Go to the source code of this file.
|
| LRESULT | RegQueryRegistryKeys (IN HKEY hRootKey, IN LPCWSTR KeyName, IN PQUERY_REGISTRY_KEYS_TABLE QueryTable, IN PVOID Context) |
| |
| LRESULT | RegQueryRegistryValues (IN HKEY hRootKey, IN LPCWSTR KeyName, IN PQUERY_REGISTRY_VALUES_TABLE QueryTable, IN PVOID Context) |
| |
| LONG | RegGetDWORDValue (IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, OUT LPDWORD lpData OPTIONAL) |
| |
| LONG | RegSetDWORDValue (IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValue OPTIONAL, IN BOOL bCreateKeyIfDoesntExist, IN DWORD dwData) |
| |
◆ RegGetDWORDValue()
Definition at line 95 of file regutils.c.
99{
102
103
104
105
106
107 if (lpSubKey)
108 {
110 }
111 else
112 {
114 {
115
118 }
119 else
120 {
122 }
123 }
124
126 {
128 dwRegData = 0,
129 dwBufSize = sizeof(dwRegData );
130
132
134 {
136 {
137 if (lpData)
138 *lpData = dwRegData;
139 }
140 else
141 {
143 }
144 }
146 {
148 {
150 }
151 }
152
153
154 if (lpSubKey)
156 }
157
158 return lRet;
159}
#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 INVALID_HANDLE_VALUE
#define ERROR_INVALID_HANDLE
#define ERROR_UNSUPPORTED_TYPE
Referenced by GetServicesActivation(), GetSystemIniActivation(), GetWinIniActivation(), HideEssentialServiceWarning(), and QUERY_REGISTRY_KEYS_ROUTINE().
◆ RegQueryRegistryKeys()
Definition at line 6 of file regutils.c.
10{
12
14 {
16
21
23 {
25 {
28 {
31 }
32
34 }
35
36 ++dwIndex;
38 szValueName[0] =
L'\0';
39 }
40
42 }
43
45}
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
#define ERROR_NO_MORE_ITEMS
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
#define KEY_ENUMERATE_SUB_KEYS
static const EHCI_PERIOD pTable[]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Referenced by AddService(), and ServicesPageWndProc().
◆ RegQueryRegistryValues()
Definition at line 51 of file regutils.c.
55{
58
60 {
61 DWORD dwIndex = 0, dwType = 0;
65
67 {
68 ++dwValueLength;
70
72 {
75 {
78 }
79 }
80
82
83 ++dwIndex;
84 dwValueLength =
ARRAYSIZE(szValueName), dwDataLength = 0;
85 szValueName[0] =
L'\0';
86 }
87
89 }
90
92}
BOOL MemFree(IN PVOID lpMem)
PVOID MemAlloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Referenced by AddService(), and ServicesPageWndProc().
◆ RegSetDWORDValue()
Definition at line 162 of file regutils.c.
167{
170
171
172
173
174
175 if (lpSubKey)
176 {
177 if (bCreateKeyIfDoesntExist)
179 else
181 }
182 else
183 {
185 {
186
189 }
190 else
191 {
193 }
194 }
195
196
197
198
200 {
202
203
204 if (lpSubKey)
206 }
207
208 return lRet;
209}
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)
#define REG_OPTION_NON_VOLATILE
static HANDLE ULONG_PTR dwData
Referenced by RegisterNoMsgAnymore(), ServicesPageWndProc(), and SetServicesActivation().