ReactOS  0.4.14-dev-297-g23e575c
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 "config.h"
24 #include <stdarg.h>
25 
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wbemcli.h"
29 
30 #include "wine/debug.h"
31 #include "wbemprox_private.h"
32 
33 #ifdef __REACTOS__
34 #include <winreg.h>
35 #endif
36 
38 
40 {
41  SAFEARRAY *sa;
42  HRESULT hr;
43  LONG i;
44 
45  if (!(sa = SafeArrayCreateVector( VT_BSTR, 0, count ))) return E_OUTOFMEMORY;
46  for (i = 0; i < count; i++)
47  {
48  if ((hr = SafeArrayPutElement( sa, &i, strings[i] )) != S_OK)
49  {
51  return hr;
52  }
53  }
54  set_variant( VT_BSTR|VT_ARRAY, 0, sa, var );
55  return S_OK;
56 }
57 
59 {
60  while (count--)
61  SysFreeString( *(strings++) );
62 }
63 
65 {
66  SAFEARRAY *sa;
67  HRESULT hr;
68  LONG i;
69 
70  if (!(sa = SafeArrayCreateVector( VT_I4, 0, count ))) return E_OUTOFMEMORY;
71  for (i = 0; i < count; i++)
72  {
73  if ((hr = SafeArrayPutElement( sa, &i, &values[i] )) != S_OK)
74  {
76  return hr;
77  }
78  }
79  set_variant( VT_I4|VT_ARRAY, 0, sa, var );
80  return S_OK;
81 }
82 
83 static HRESULT create_key( HKEY root, const WCHAR *subkey, VARIANT *retval )
84 {
85  LONG res;
86  HKEY hkey;
87 
88  TRACE("%p, %s\n", root, debugstr_w(subkey));
89 
90  res = RegCreateKeyExW( root, subkey, 0, NULL, 0, 0, NULL, &hkey, NULL );
91  set_variant( VT_UI4, res, NULL, retval );
92  if (!res)
93  {
94  RegCloseKey( hkey );
95  return S_OK;
96  }
97  return HRESULT_FROM_WIN32( res );
98 }
99 
101 {
102  VARIANT defkey, subkey, retval;
104  HRESULT hr;
105 
106  TRACE("%p, %p\n", in, out);
107 
108  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
109  if (hr != S_OK) return hr;
110  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
111  if (hr != S_OK) return hr;
112 
114  if (hr != S_OK)
115  {
116  VariantClear( &subkey );
117  return hr;
118  }
119  if (out)
120  {
121  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
122  if (hr != S_OK)
123  {
124  VariantClear( &subkey );
125  IWbemClassObject_Release( sig );
126  return hr;
127  }
128  }
129  hr = create_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &retval );
130  if (hr == S_OK && out_params)
131  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
132 
133  VariantClear( &subkey );
134  IWbemClassObject_Release( sig );
135  if (hr == S_OK && out)
136  {
137  *out = out_params;
138  IWbemClassObject_AddRef( out_params );
139  }
140  if (out_params) IWbemClassObject_Release( out_params );
141  return hr;
142 }
143 
144 static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *retval )
145 {
146  HKEY hkey;
147  HRESULT hr = S_OK;
148  WCHAR buf[256];
149  BSTR *strings, *tmp;
150  DWORD count = 2, len = ARRAY_SIZE( buf );
151  LONG res, i = 0;
152 
153  TRACE("%p, %s\n", root, debugstr_w(subkey));
154 
155  if (!(strings = heap_alloc( count * sizeof(BSTR) ))) return E_OUTOFMEMORY;
156  if ((res = RegOpenKeyExW( root, subkey, 0, KEY_ENUMERATE_SUB_KEYS, &hkey )))
157  {
158  set_variant( VT_UI4, res, NULL, retval );
159  heap_free( strings );
160  return S_OK;
161  }
162  for (;;)
163  {
164  if (i >= count)
165  {
166  count *= 2;
167  if (!(tmp = heap_realloc( strings, count * sizeof(BSTR) )))
168  {
169  RegCloseKey( hkey );
170  return E_OUTOFMEMORY;
171  }
172  strings = tmp;
173  }
174  if ((res = RegEnumKeyW( hkey, i, buf, len )) == ERROR_NO_MORE_ITEMS)
175  {
176  if (i) res = ERROR_SUCCESS;
177  break;
178  }
179  if (res) break;
180  if (!(strings[i] = SysAllocString( buf )))
181  {
182  for (i--; i >= 0; i--) SysFreeString( strings[i] );
183  hr = E_OUTOFMEMORY;
184  break;
185  }
186  i++;
187  }
188  if (hr == S_OK && !res)
189  {
190  hr = to_bstr_array( strings, i, names );
192  }
193  set_variant( VT_UI4, res, NULL, retval );
194  RegCloseKey( hkey );
195  heap_free( strings );
196  return hr;
197 }
198 
200 {
201  VARIANT defkey, subkey, names, retval;
203  HRESULT hr;
204 
205  TRACE("%p, %p\n", in, out);
206 
207  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
208  if (hr != S_OK) return hr;
209  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
210  if (hr != S_OK) return hr;
211 
213  if (hr != S_OK)
214  {
215  VariantClear( &subkey );
216  return hr;
217  }
218  if (out)
219  {
220  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
221  if (hr != S_OK)
222  {
223  VariantClear( &subkey );
224  IWbemClassObject_Release( sig );
225  return hr;
226  }
227  }
228  VariantInit( &names );
229  hr = enum_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &retval );
230  if (hr != S_OK) goto done;
231  if (out_params)
232  {
233  if (!V_UI4( &retval ))
234  {
235  hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
236  if (hr != S_OK) goto done;
237  }
238  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
239  }
240 
241 done:
242  VariantClear( &names );
243  VariantClear( &subkey );
244  IWbemClassObject_Release( sig );
245  if (hr == S_OK && out)
246  {
247  *out = out_params;
248  IWbemClassObject_AddRef( out_params );
249  }
250  if (out_params) IWbemClassObject_Release( out_params );
251  return hr;
252 }
253 
254 static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, VARIANT *retval )
255 {
256  HKEY hkey = NULL;
257  HRESULT hr = S_OK;
258  BSTR *value_names = NULL;
259  DWORD count, buflen, len, *value_types = NULL;
260  LONG res, i = 0;
261  WCHAR *buf = NULL;
262 
263  TRACE("%p, %s\n", root, debugstr_w(subkey));
264 
265  if ((res = RegOpenKeyExW( root, subkey, 0, KEY_QUERY_VALUE, &hkey ))) goto done;
266  if ((res = RegQueryInfoKeyW( hkey, NULL, NULL, NULL, NULL, NULL, NULL, &count, &buflen, NULL, NULL, NULL )))
267  goto done;
268 
269  hr = E_OUTOFMEMORY;
270  if (!(buf = heap_alloc( (buflen + 1) * sizeof(WCHAR) ))) goto done;
271  if (!(value_names = heap_alloc( count * sizeof(BSTR) ))) goto done;
272  if (!(value_types = heap_alloc( count * sizeof(DWORD) ))) goto done;
273 
274  hr = S_OK;
275  for (;;)
276  {
277  len = buflen + 1;
278  res = RegEnumValueW( hkey, i, buf, &len, NULL, &value_types[i], NULL, NULL );
279  if (res == ERROR_NO_MORE_ITEMS)
280  {
281  if (i) res = ERROR_SUCCESS;
282  break;
283  }
284  if (res) break;
285  if (!(value_names[i] = SysAllocString( buf )))
286  {
287  for (i--; i >= 0; i--) SysFreeString( value_names[i] );
288  hr = E_OUTOFMEMORY;
289  break;
290  }
291  i++;
292  }
293  if (hr == S_OK && !res)
294  {
295  hr = to_bstr_array( value_names, i, names );
296  free_bstr_array( value_names, i );
297  if (hr == S_OK) hr = to_i4_array( value_types, i, types );
298  }
299 
300 done:
301  set_variant( VT_UI4, res, NULL, retval );
302  RegCloseKey( hkey );
303  heap_free( value_names );
304  heap_free( value_types );
305  heap_free( buf );
306  return hr;
307 }
308 
310 {
311  VARIANT defkey, subkey, names, types, retval;
313  HRESULT hr;
314 
315  TRACE("%p, %p\n", in, out);
316 
317  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
318  if (hr != S_OK) return hr;
319  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
320  if (hr != S_OK) return hr;
321 
323  if (hr != S_OK)
324  {
325  VariantClear( &subkey );
326  return hr;
327  }
328  if (out)
329  {
330  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
331  if (hr != S_OK)
332  {
333  VariantClear( &subkey );
334  IWbemClassObject_Release( sig );
335  return hr;
336  }
337  }
338  VariantInit( &names );
339  VariantInit( &types );
340  hr = enum_values( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &names, &types, &retval );
341  if (hr != S_OK) goto done;
342  if (out_params)
343  {
344  if (!V_UI4( &retval ))
345  {
346  hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
347  if (hr != S_OK) goto done;
348  hr = IWbemClassObject_Put( out_params, param_typesW, 0, &types, CIM_SINT32|CIM_FLAG_ARRAY );
349  if (hr != S_OK) goto done;
350  }
351  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
352  }
353 
354 done:
355  VariantClear( &types );
356  VariantClear( &names );
357  VariantClear( &subkey );
358  IWbemClassObject_Release( sig );
359  if (hr == S_OK && out)
360  {
361  *out = out_params;
362  IWbemClassObject_AddRef( out_params );
363  }
364  if (out_params) IWbemClassObject_Release( out_params );
365  return hr;
366 }
367 
368 static HRESULT get_stringvalue( HKEY root, const WCHAR *subkey, const WCHAR *name, VARIANT *value, VARIANT *retval )
369 {
370  HRESULT hr = S_OK;
371  BSTR str = NULL;
372  DWORD size;
373  LONG res;
374 
375  TRACE("%p, %s, %s\n", root, debugstr_w(subkey), debugstr_w(name));
376 
377  if ((res = RegGetValueW( root, subkey, name, RRF_RT_REG_SZ, NULL, NULL, &size ))) goto done;
378  if (!(str = SysAllocStringLen( NULL, size / sizeof(WCHAR) - 1 )))
379  {
380  hr = E_OUTOFMEMORY;
381  goto done;
382  }
383  if (!(res = RegGetValueW( root, subkey, name, RRF_RT_REG_SZ, NULL, str, &size )))
384  set_variant( VT_BSTR, 0, str, value );
385 
386 done:
387  set_variant( VT_UI4, res, NULL, retval );
388  if (res) SysFreeString( str );
389  return hr;
390 }
391 
393 {
394  VARIANT defkey, subkey, name, value, retval;
396  HRESULT hr;
397 
398  TRACE("%p, %p\n", in, out);
399 
400  hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
401  if (hr != S_OK) return hr;
402  hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
403  if (hr != S_OK) return hr;
404  hr = IWbemClassObject_Get( in, param_valuenameW, 0, &name, NULL, NULL );
405  if (hr != S_OK) return hr;
406 
408  if (hr != S_OK)
409  {
410  VariantClear( &name );
411  VariantClear( &subkey );
412  return hr;
413  }
414  if (out)
415  {
416  hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
417  if (hr != S_OK)
418  {
419  VariantClear( &name );
420  VariantClear( &subkey );
421  IWbemClassObject_Release( sig );
422  return hr;
423  }
424  }
425  VariantInit( &value );
426  hr = get_stringvalue( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), V_BSTR(&name), &value, &retval );
427  if (hr != S_OK) goto done;
428  if (out_params)
429  {
430  if (!V_UI4( &retval ))
431  {
432  hr = IWbemClassObject_Put( out_params, param_valueW, 0, &value, CIM_STRING );
433  if (hr != S_OK) goto done;
434  }
435  hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
436  }
437 
438 done:
439  VariantClear( &name );
440  VariantClear( &subkey );
441  IWbemClassObject_Release( sig );
442  if (hr == S_OK && out)
443  {
444  *out = out_params;
445  IWbemClassObject_AddRef( out_params );
446  }
447  if (out_params) IWbemClassObject_Release( out_params );
448  return hr;
449 }
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1965
static HRESULT enum_key(HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *retval)
Definition: reg.c:144
Definition: compat.h:1939
#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:342
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
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:392
OLECHAR * BSTR
Definition: compat.h:1934
HRESULT reg_create_key(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
Definition: reg.c:100
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
int32_t INT_PTR
Definition: typedefs.h:62
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:83
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:241
void set_variant(VARTYPE type, LONGLONG val, void *val_ptr, VARIANT *ret)
Definition: query.c:797
HRESULT reg_enum_key(IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out)
Definition: reg.c:199
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:309
Definition: cmds.c:130
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
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:58
static HRESULT enum_values(HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT *types, VARIANT *retval)
Definition: reg.c:254
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:39
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1349
SAFEARRAY *WINAPI SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements)
Definition: safearray.c:679
#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:651
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:274
static HRESULT get_stringvalue(HKEY root, const WCHAR *subkey, const WCHAR *name, VARIANT *value, VARIANT *retval)
Definition: reg.c:368
static const WCHAR param_valueW[]
HRESULT create_signature(const WCHAR *class, const WCHAR *method, enum param_direction dir, IWbemClassObject **sig)
Definition: class.c:818
static const WCHAR method_createkeyW[]
Definition: name.c:36
GLuint res
Definition: glext.h:9613
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
Definition: safearray.c:866
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:64
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019