ReactOS  0.4.15-dev-1018-g0695ecb
reg.c
Go to the documentation of this file.
1 /*
2  * StdRegProv implementation
3  *
4  * Copyright 2012 Hans Leidekker for CodeWeavers
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #define COBJMACROS
22 
23 #include <stdarg.h>
24 
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wbemcli.h"
28 
29 #include "wine/debug.h"
30 #include "wbemprox_private.h"
31 
32 #ifdef __REACTOS__
33 #include <winreg.h>
34 #endif
35 
37 
39 {
40  SAFEARRAY *sa;
41  HRESULT hr;
42  LONG i;
43 
44  if (!(sa = SafeArrayCreateVector( VT_BSTR, 0, count ))) return E_OUTOFMEMORY;
45  for (i = 0; i < count; i++)
46  {
47  if ((hr = SafeArrayPutElement( sa, &i, strings[i] )) != S_OK)
48  {
50  return hr;
51  }
52  }
54  return S_OK;
55 }
56 
58 {
59  while (count--)
60  SysFreeString( *(strings++) );
61 }
62 
64 {
65  SAFEARRAY *sa;
66  HRESULT hr;
67  LONG i;
68 
69  if (!(sa = SafeArrayCreateVector( VT_I4, 0, count ))) return E_OUTOFMEMORY;
70  for (i = 0; i < count; i++)
71  {
72  if ((hr = SafeArrayPutElement( sa, &i, &values[i] )) != S_OK)
73  {
75  return hr;
76  }
77  }
79  return S_OK;
80 }
81 
82 static HRESULT create_key( HKEY root, const WCHAR *subkey, VARIANT *retval )
83 {
84  LONG res;
85  HKEY hkey;
86 
87  TRACE("%p, %s\n", root, debugstr_w(subkey));
88 
89  res = RegCreateKeyExW( root, subkey, 0, NULL, 0, 0, NULL, &hkey, NULL );
90  set_variant( VT_UI4, res, NULL, retval );
91  if (!res)
92  {
93  RegCloseKey( hkey );
94  return S_OK;
95  }
96  return HRESULT_FROM_WIN32( res );
97 }
98 
100 {
101  VARIANT defkey, subkey, retval;
103  HRESULT hr;
104 
105  TRACE("%p, %p\n", in, out);
106 
107  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
108  if (hr != S_OK) return hr;
109  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
110  if (hr != S_OK) return hr;
111 
113  if (hr != S_OK)
114  {
115  VariantClear( &subkey );
116  return hr;
117  }
118  if (out)
119  {
120  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
121  if (hr != S_OK)
122  {
123  VariantClear( &subkey );
124  IWbemClassObject_Release( sig );
125  return hr;
126  }
127  }
128  hr = create_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &retval );
129  if (hr == S_OK && out_params)
130  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
131 
132  VariantClear( &subkey );
133  IWbemClassObject_Release( sig );
134  if (hr == S_OK && out)
135  {
136  *out = out_params;
137  IWbemClassObject_AddRef( out_params );
138  }
139  if (out_params) IWbemClassObject_Release( out_params );
140  return hr;
141 }
142 
143 static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *retval )
144 {
145  HKEY hkey;
146  HRESULT hr = S_OK;
147  WCHAR buf[256];
148  BSTR *strings, *tmp;
149  DWORD count = 2, len = ARRAY_SIZE( buf );
150  LONG res, i = 0;
151 
152  TRACE("%p, %s\n", root, debugstr_w(subkey));
153 
154  if (!(strings = heap_alloc( count * sizeof(BSTR) ))) return E_OUTOFMEMORY;
155  if ((res = RegOpenKeyExW( root, subkey, 0, KEY_ENUMERATE_SUB_KEYS, &hkey )))
156  {
157  set_variant( VT_UI4, res, NULL, retval );
158  heap_free( strings );
159  return S_OK;
160  }
161  for (;;)
162  {
163  if (i >= count)
164  {
165  count *= 2;
166  if (!(tmp = heap_realloc( strings, count * sizeof(BSTR) )))
167  {
168  RegCloseKey( hkey );
169  return E_OUTOFMEMORY;
170  }
171  strings = tmp;
172  }
173  if ((res = RegEnumKeyW( hkey, i, buf, len )) == ERROR_NO_MORE_ITEMS)
174  {
175  if (i) res = ERROR_SUCCESS;
176  break;
177  }
178  if (res) break;
179  if (!(strings[i] = SysAllocString( buf )))
180  {
181  for (i--; i >= 0; i--) SysFreeString( strings[i] );
182  hr = E_OUTOFMEMORY;
183  break;
184  }
185  i++;
186  }
187  if (hr == S_OK && !res)
188  {
189  hr = to_bstr_array( strings, i, names );
191  }
192  set_variant( VT_UI4, res, NULL, retval );
193  RegCloseKey( hkey );
194  heap_free( strings );
195  return hr;
196 }
197 
199 {
200  VARIANT defkey, subkey, names, retval;
202  HRESULT hr;
203 
204  TRACE("%p, %p\n", in, out);
205 
206  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
207  if (hr != S_OK) return hr;
208  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
209  if (hr != S_OK) return hr;
210 
212  if (hr != S_OK)
213  {
214  VariantClear( &subkey );
215  return hr;
216  }
217  if (out)
218  {
219  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
220  if (hr != S_OK)
221  {
222  VariantClear( &subkey );
223  IWbemClassObject_Release( sig );
224  return hr;
225  }
226  }
227  VariantInit( &names );
228  hr = enum_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &retval );
229  if (hr != S_OK) goto done;
230  if (out_params)
231  {
232  if (!V_UI4( &retval ))
233  {
234  hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
235  if (hr != S_OK) goto done;
236  }
237  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
238  }
239 
240 done:
241  VariantClear( &names );
242  VariantClear( &subkey );
243  IWbemClassObject_Release( sig );
244  if (hr == S_OK && out)
245  {
246  *out = out_params;
247  IWbemClassObject_AddRef( out_params );
248  }
249  if (out_params) IWbemClassObject_Release( out_params );
250  return hr;
251 }
252 
253 static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, VARIANT *retval )
254 {
255  HKEY hkey = NULL;
256  HRESULT hr = S_OK;
257  BSTR *value_names = NULL;
258  DWORD count, buflen, len, *value_types = NULL;
259  LONG res, i = 0;
260  WCHAR *buf = NULL;
261 
262  TRACE("%p, %s\n", root, debugstr_w(subkey));
263 
264  if ((res = RegOpenKeyExW( root, subkey, 0, KEY_QUERY_VALUE, &hkey ))) goto done;
265  if ((res = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, NULL, &count, &buflen, NULL, NULL, NULL )))
266  goto done;
267 
268  hr = E_OUTOFMEMORY;
269  if (!(buf = heap_alloc( (buflen + 1) * sizeof(WCHAR) ))) goto done;
270  if (!(value_names = heap_alloc( count * sizeof(BSTR) ))) goto done;
271  if (!(value_types = heap_alloc( count * sizeof(DWORD) ))) goto done;
272 
273  hr = S_OK;
274  for (;;)
275  {
276  len = buflen + 1;
277  res = RegEnumValueW( hkey, i, buf, &len, NULL, &value_types[i], NULL, NULL );
278  if (res == ERROR_NO_MORE_ITEMS)
279  {
280  if (i) res = ERROR_SUCCESS;
281  break;
282  }
283  if (res) break;
284  if (!(value_names[i] = SysAllocString( buf )))
285  {
286  for (i--; i >= 0; i--) SysFreeString( value_names[i] );
287  hr = E_OUTOFMEMORY;
288  break;
289  }
290  i++;
291  }
292  if (hr == S_OK && !res)
293  {
294  hr = to_bstr_array( value_names, i, names );
295  free_bstr_array( value_names, i );
296  if (hr == S_OK) hr = to_i4_array( value_types, i, types );
297  }
298 
299 done:
300  set_variant( VT_UI4, res, NULL, retval );
301  RegCloseKey( hkey );
302  heap_free( value_names );
303  heap_free( value_types );
304  heap_free( buf );
305  return hr;
306 }
307 
309 {
310  VARIANT defkey, subkey, names, types, retval;
312  HRESULT hr;
313 
314  TRACE("%p, %p\n", in, out);
315 
316  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
317  if (hr != S_OK) return hr;
318  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
319  if (hr != S_OK) return hr;
320 
322  if (hr != S_OK)
323  {
324  VariantClear( &subkey );
325  return hr;
326  }
327  if (out)
328  {
329  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
330  if (hr != S_OK)
331  {
332  VariantClear( &subkey );
333  IWbemClassObject_Release( sig );
334  return hr;
335  }
336  }
337  VariantInit( &names );
338  VariantInit( &types );
339  hr = enum_values( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &types, &retval );
340  if (hr != S_OK) goto done;
341  if (out_params)
342  {
343  if (!V_UI4( &retval ))
344  {
345  hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
346  if (hr != S_OK) goto done;
347  hr = IWbemClassObject_Put( out_params, param_typesW, 0, &types, CIM_SINT32|CIM_FLAG_ARRAY );
348  if (hr != S_OK) goto done;
349  }
350  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
351  }
352 
353 done:
354  VariantClear( &types );
355  VariantClear( &names );
356  VariantClear( &subkey );
357  IWbemClassObject_Release( sig );
358  if (hr == S_OK && out)
359  {
360  *out = out_params;
361  IWbemClassObject_AddRef( out_params );
362  }
363  if (out_params) IWbemClassObject_Release( out_params );
364  return hr;
365 }
366 
367 static HRESULT get_stringvalue( HKEY root, const WCHAR *subkey, const WCHAR *name, VARIANT *value, VARIANT *retval )
368 {
369  HRESULT hr = S_OK;
370  BSTR str = NULL;
371  DWORD size;
372  LONG res;
373 
374  TRACE("%p, %s, %s\n", root, debugstr_w(subkey), debugstr_w(name));
375 
376  if ((res = RegGetValueW( root, subkey, name, RRF_RT_REG_SZ, NULL, NULL, &size ))) goto done;
377  if (!(str = SysAllocStringLen( NULL, size / sizeof(WCHAR) - 1 )))
378  {
379  hr = E_OUTOFMEMORY;
380  goto done;
381  }
382  if (!(res = RegGetValueW( root, subkey, name, RRF_RT_REG_SZ, NULL, str, &size )))
383  set_variant( VT_BSTR, 0, str, value );
384 
385 done:
386  set_variant( VT_UI4, res, NULL, retval );
387  if (res) SysFreeString( str );
388  return hr;
389 }
390 
392 {
393  VARIANT defkey, subkey, name, value, retval;
395  HRESULT hr;
396 
397  TRACE("%p, %p\n", in, out);
398 
399  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
400  if (hr != S_OK) return hr;
401  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
402  if (hr != S_OK) return hr;
403  hr = IWbemClassObject_Get( in, param_valuenameW, 0, &name, NULL, NULL );
404  if (hr != S_OK) return hr;
405 
407  if (hr != S_OK)
408  {
409  VariantClear( &name );
410  VariantClear( &subkey );
411  return hr;
412  }
413  if (out)
414  {
415  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
416  if (hr != S_OK)
417  {
418  VariantClear( &name );
419  VariantClear( &subkey );
420  IWbemClassObject_Release( sig );
421  return hr;
422  }
423  }
424  VariantInit( &value );
425  hr = get_stringvalue( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), V_BSTR(&name), &value, &retval );
426  if (hr != S_OK) goto done;
427  if (out_params)
428  {
429  if (!V_UI4( &retval ))
430  {
431  hr = IWbemClassObject_Put( out_params, param_valueW, 0, &value, CIM_STRING );
432  if (hr != S_OK) goto done;
433  }
434  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
435  }
436 
437 done:
438  VariantClear( &name );
439  VariantClear( &subkey );
440  IWbemClassObject_Release( sig );
441  if (hr == S_OK && out)
442  {
443  *out = out_params;
444  IWbemClassObject_AddRef( out_params );
445  }
446  if (out_params) IWbemClassObject_Release( out_params );
447  return hr;
448 }
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1965
const char * var
Definition: shader.c:5666
static HRESULT enum_key(HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *retval)
Definition: reg.c:143
Definition: compat.h:2046
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
static const WCHAR method_enumvaluesW[]
GLsizei GLenum GLenum * types
Definition: glext.h:7753
#define RRF_RT_REG_SZ
Definition: driver.c:575
HRESULT reg_get_stringvalue(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
Definition: reg.c:391
OLECHAR * BSTR
Definition: compat.h:2041
HRESULT reg_create_key(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
Definition: reg.c:99
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
int32_t INT_PTR
Definition: typedefs.h:64
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static const WCHAR param_subkeynameW[]
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static const WCHAR method_enumkeyW[]
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)
Definition: reg.c:1091
#define V_I4(A)
Definition: oleauto.h:247
static HRESULT create_key(HKEY root, const WCHAR *subkey, VARIANT *retval)
Definition: reg.c:82
GLuint GLuint * names
Definition: glext.h:11545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const WCHAR param_typesW[]
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
static const WCHAR param_namesW[]
const WCHAR * str
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)
Definition: reg.c:2853
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR class_stdregprovW[]
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void set_variant(VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret)
Definition: query.c:1093
HRESULT reg_enum_key(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
Definition: reg.c:198
static const WCHAR param_valuenameW[]
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT reg_enum_values(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
Definition: reg.c:308
Definition: cmds.c:130
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
static FILE * out
Definition: regtests2xml.c:44
static void out_params(void)
Definition: nanoxwin.c:1413
unsigned long DWORD
Definition: ntddk_ex.h:95
static void free_bstr_array(BSTR *strings, DWORD count)
Definition: reg.c:57
static HRESULT enum_values(HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, VARIANT *retval)
Definition: reg.c:253
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
Definition: reg.c:3686
static HRESULT to_bstr_array(BSTR *strings, DWORD count, VARIANT *var)
Definition: reg.c:38
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1347
SAFEARRAY *WINAPI SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements)
Definition: safearray.c:677
#define V_UI4(A)
Definition: oleauto.h:270
WINE_DEFAULT_DEBUG_CHANNEL(reg)
GLsizei const GLchar *const * strings
Definition: glext.h:7622
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
static const WCHAR method_getstringvalueW[]
static const WCHAR param_defkeyW[]
GLenum GLsizei len
Definition: glext.h:6722
GLsizei const GLfloat * value
Definition: glext.h:6069
#define V_BSTR(A)
Definition: oleauto.h:226
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
Definition: reg.c:2416
#define S_OK
Definition: intsafe.h:59
GLuint in
Definition: glext.h:9616
#define ARRAY_SIZE(a)
Definition: main.h:24
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static HRESULT get_stringvalue(HKEY root, const WCHAR *subkey, const WCHAR *name, VARIANT *value, VARIANT *retval)
Definition: reg.c:367
static const WCHAR param_valueW[]
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:819
static const WCHAR method_createkeyW[]
Definition: name.c:38
GLuint res
Definition: glext.h:9613
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
Definition: safearray.c:864
static const WCHAR param_returnvalueW[]
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
const WCHAR * name
Definition: reg.c:67
static struct sockaddr_in sa
Definition: adnsresfilter.c:69
static HRESULT to_i4_array(DWORD *values, DWORD count, VARIANT *var)
Definition: reg.c:63
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019