ReactOS 0.4.16-dev-2320-ge1853c6
roapi.c
Go to the documentation of this file.
1/*
2 * Copyright 2014 Martin Storsjo
3 * Copyright 2016 Michael Müller
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19#define COBJMACROS
20#include "objbase.h"
21#include "initguid.h"
22#include "roapi.h"
23#include "roparameterizediid.h"
24#include "roerrorapi.h"
25#include "winstring.h"
26
27#include "combase_private.h"
28
29#include "wine/debug.h"
30
32
34{
40};
41
43{
44 ACTCTX_SECTION_KEYED_DATA data;
45 HKEY hkey_root, hkey_class;
47 HRESULT hr;
48 WCHAR *buf = NULL;
49
50 *out = NULL;
51
52 /* search activation context first */
53 data.cbSize = sizeof(data);
54 if (FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL,
55 ACTIVATION_CONTEXT_SECTION_WINRT_ACTIVATABLE_CLASSES, classid, &data))
56 {
57 struct activatable_class_data *activatable_class = (struct activatable_class_data *)data.lpData;
58 void *ptr = (BYTE *)data.lpSectionBase + activatable_class->module_offset;
59 *out = wcsdup(ptr);
60 return S_OK;
61 }
62
63 /* load class registry key */
64 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\WindowsRuntime\\ActivatableClassId",
65 0, KEY_READ, &hkey_root))
66 return REGDB_E_READREGDB;
67 if (RegOpenKeyExW(hkey_root, classid, 0, KEY_READ, &hkey_class))
68 {
69 WARN("Class %s not found in registry\n", debugstr_w(classid));
70 RegCloseKey(hkey_root);
72 }
73 RegCloseKey(hkey_root);
74
75 /* load (and expand) DllPath registry value */
76 if (RegQueryValueExW(hkey_class, L"DllPath", NULL, &type, NULL, &size))
77 {
79 goto done;
80 }
81 if (type != REG_SZ && type != REG_EXPAND_SZ)
82 {
84 goto done;
85 }
86 if (!(buf = malloc(size)))
87 {
89 goto done;
90 }
91 if (RegQueryValueExW(hkey_class, L"DllPath", NULL, NULL, (BYTE *)buf, &size))
92 {
94 goto done;
95 }
96 if (type == REG_EXPAND_SZ)
97 {
98 WCHAR *expanded;
100 if (!(expanded = malloc(len * sizeof(WCHAR))))
101 {
103 goto done;
104 }
106 free(buf);
107 buf = expanded;
108 }
109
110 *out = buf;
111 return S_OK;
112
113done:
114 free(buf);
115 RegCloseKey(hkey_class);
116 return hr;
117}
118
119
120/***********************************************************************
121 * RoInitialize (combase.@)
122 */
124{
125 switch (type) {
128 default:
129 FIXME("type %d\n", type);
132 }
133}
134
135/***********************************************************************
136 * RoUninitialize (combase.@)
137 */
139{
141}
142
143/***********************************************************************
144 * RoGetActivationFactory (combase.@)
145 */
147{
148 PFNGETACTIVATIONFACTORY pDllGetActivationFactory;
150 WCHAR *library;
152 HRESULT hr;
153
154 FIXME("(%s, %s, %p): semi-stub\n", debugstr_hstring(classid), debugstr_guid(iid), class_factory);
155
156 if (!iid || !class_factory)
157 return E_INVALIDARG;
158
159 if (FAILED(hr = ensure_mta()))
160 return hr;
161
163 if (FAILED(hr))
164 {
165 ERR("Failed to find library for %s\n", debugstr_hstring(classid));
166 return hr;
167 }
168
169 if (!(module = LoadLibraryW(library)))
170 {
171 ERR("Failed to load module %s\n", debugstr_w(library));
173 goto done;
174 }
175
176 if (!(pDllGetActivationFactory = (void *)GetProcAddress(module, "DllGetActivationFactory")))
177 {
178 ERR("Module %s does not implement DllGetActivationFactory\n", debugstr_w(library));
179 hr = E_FAIL;
180 goto done;
181 }
182
183 TRACE("Found library %s for class %s\n", debugstr_w(library), debugstr_hstring(classid));
184
185 hr = pDllGetActivationFactory(classid, &factory);
186 if (SUCCEEDED(hr))
187 {
188 hr = IActivationFactory_QueryInterface(factory, iid, class_factory);
189 if (SUCCEEDED(hr))
190 {
191 TRACE("Created interface %p\n", *class_factory);
192 module = NULL;
193 }
194 IActivationFactory_Release(factory);
195 }
196
197done:
198 free(library);
200 return hr;
201}
202
203/***********************************************************************
204 * RoGetParameterizedTypeInstanceIID (combase.@)
205 */
206HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, const WCHAR **name_elements,
207 const IRoMetaDataLocator *meta_data_locator, GUID *iid,
208 ROPARAMIIDHANDLE *hiid)
209{
210 FIXME("stub: %d %p %p %p %p\n", name_element_count, name_elements, meta_data_locator, iid, hiid);
211 if (iid) *iid = GUID_NULL;
212 if (hiid) *hiid = INVALID_HANDLE_VALUE;
213 return E_NOTIMPL;
214}
215
216/***********************************************************************
217 * RoActivateInstance (combase.@)
218 */
220{
222 HRESULT hr;
223
224 FIXME("(%p, %p): semi-stub\n", classid, instance);
225
226 hr = RoGetActivationFactory(classid, &IID_IActivationFactory, (void **)&factory);
227 if (SUCCEEDED(hr))
228 {
229 hr = IActivationFactory_ActivateInstance(factory, instance);
230 IActivationFactory_Release(factory);
231 }
232
233 return hr;
234}
235
237{
244};
245
247{
248 HRESULT hr;
249
250 hr = CreateStreamOnHGlobal(0, TRUE, &ref->marshal_stream);
251 if (FAILED(hr))
252 return hr;
253
254 hr = CoMarshalInterface(ref->marshal_stream, riid, obj, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLESTRONG);
255 if (FAILED(hr))
256 {
257 IStream_Release(ref->marshal_stream);
258 ref->marshal_stream = NULL;
259 }
260 return hr;
261}
262
264{
266}
267
269{
270 TRACE("(%p, %s, %p)\n", iface, debugstr_guid(riid), obj);
271
272 if (!riid || !obj) return E_INVALIDARG;
273
275 || IsEqualGUID(riid, &IID_IAgileObject)
276 || IsEqualGUID(riid, &IID_IAgileReference))
277 {
278 IUnknown_AddRef(iface);
279 *obj = iface;
280 return S_OK;
281 }
282
283 *obj = NULL;
284 FIXME("interface %s is not implemented\n", debugstr_guid(riid));
285 return E_NOINTERFACE;
286}
287
289{
290 struct agile_reference *impl = impl_from_IAgileReference(iface);
291 return InterlockedIncrement(&impl->ref);
292}
293
295{
296 struct agile_reference *impl = impl_from_IAgileReference(iface);
298
299 if (!ref)
300 {
301 TRACE("destroying %p\n", iface);
302
303 if (impl->obj)
304 IUnknown_Release(impl->obj);
305
306 if (impl->marshal_stream)
307 {
308 LARGE_INTEGER zero = {0};
309
310 IStream_Seek(impl->marshal_stream, zero, STREAM_SEEK_SET, NULL);
312 IStream_Release(impl->marshal_stream);
313 }
315 free(impl);
316 }
317
318 return ref;
319}
320
322{
323 struct agile_reference *impl = impl_from_IAgileReference(iface);
324 LARGE_INTEGER zero = {0};
325 HRESULT hr;
326
327 TRACE("(%p, %s, %p)\n", iface, debugstr_guid(riid), obj);
328
329 EnterCriticalSection(&impl->cs);
331 {
333 {
334 LeaveCriticalSection(&impl->cs);
335 return hr;
336 }
337
338 IUnknown_Release(impl->obj);
339 impl->obj = NULL;
340 }
341
342 if (SUCCEEDED(hr = IStream_Seek(impl->marshal_stream, zero, STREAM_SEEK_SET, NULL)))
344
345 LeaveCriticalSection(&impl->cs);
346 return hr;
347}
348
349static const IAgileReferenceVtbl agile_ref_vtbl =
350{
355};
356
357/***********************************************************************
358 * RoGetAgileReference (combase.@)
359 */
362{
363 struct agile_reference *impl;
365 HRESULT hr;
366
367 TRACE("(%d, %s, %p, %p).\n", option, debugstr_guid(riid), obj, agile_reference);
368
370 return E_INVALIDARG;
371
373 {
374 ERR("Apartment not initialized\n");
375 return CO_E_NOTINITIALIZED;
376 }
377
378 hr = IUnknown_QueryInterface(obj, riid, (void **)&unknown);
379 if (FAILED(hr))
380 return E_NOINTERFACE;
381 IUnknown_Release(unknown);
382
383 hr = IUnknown_QueryInterface(obj, &IID_INoMarshal, (void **)&unknown);
384 if (SUCCEEDED(hr))
385 {
386 IUnknown_Release(unknown);
387 return CO_E_NOT_SUPPORTED;
388 }
389
390 impl = calloc(1, sizeof(*impl));
391 if (!impl)
392 return E_OUTOFMEMORY;
393
395 impl->option = option;
396 impl->ref = 1;
397
399 {
401 {
402 free(impl);
403 return hr;
404 }
405 }
407 {
408 impl->obj = obj;
409 IUnknown_AddRef(impl->obj);
410 }
411
413
415 return S_OK;
416}
417
418/***********************************************************************
419 * RoGetApartmentIdentifier (combase.@)
420 */
422{
423 FIXME("(%p): stub\n", identifier);
424
425 if (!identifier)
426 return E_INVALIDARG;
427
428 *identifier = 0xdeadbeef;
429 return S_OK;
430}
431
432/***********************************************************************
433 * RoRegisterForApartmentShutdown (combase.@)
434 */
436 UINT64 *identifier, APARTMENT_SHUTDOWN_REGISTRATION_COOKIE *cookie)
437{
438 HRESULT hr;
439
440 FIXME("(%p, %p, %p): stub\n", callback, identifier, cookie);
441
442 hr = RoGetApartmentIdentifier(identifier);
443 if (FAILED(hr))
444 return hr;
445
446 if (cookie)
447 *cookie = (void *)0xcafecafe;
448 return S_OK;
449}
450
451/***********************************************************************
452 * RoGetServerActivatableClasses (combase.@)
453 */
455{
456 FIXME("(%p, %p, %p): stub\n", name, classes, count);
457
458 if (count)
459 *count = 0;
460 return S_OK;
461}
462
463/***********************************************************************
464 * RoRegisterActivationFactories (combase.@)
465 */
468{
469 FIXME("(%p, %p, %d, %p): stub\n", classes, callbacks, count, cookie);
470
471 return S_OK;
472}
473
474/***********************************************************************
475 * GetRestrictedErrorInfo (combase.@)
476 */
478{
479 FIXME( "(%p)\n", info );
480 return E_NOTIMPL;
481}
482
483/***********************************************************************
484 * SetRestrictedErrorInfo (combase.@)
485 */
487{
488 FIXME( "(%p)\n", info );
489 return E_NOTIMPL;
490}
491
492/***********************************************************************
493 * RoOriginateLanguageException (combase.@)
494 */
496{
497 FIXME("%#lx, %s, %p: stub\n", error, debugstr_hstring(message), language_exception);
498 return FALSE;
499}
500
501/***********************************************************************
502 * RoOriginateError (combase.@)
503 */
505{
506 FIXME("%#lx, %s: stub\n", error, debugstr_hstring(message));
507 return FALSE;
508}
509
510/***********************************************************************
511 * RoOriginateErrorW (combase.@)
512 */
514{
515 FIXME("%#lx, %u, %p: stub\n", error, max_len, message);
516 return FALSE;
517}
518
519/***********************************************************************
520 * RoSetErrorReportingFlags (combase.@)
521 */
523{
524 FIXME("(%08x): stub\n", flags);
525 return S_OK;
526}
527
528/***********************************************************************
529 * CleanupTlsOleState (combase.@)
530 */
532{
533 FIXME("(%p): stub\n", unknown);
534}
535
536/***********************************************************************
537 * DllGetActivationFactory (combase.@)
538 */
540{
541 FIXME("(%s, %p): stub\n", debugstr_hstring(classid), factory);
542
543 return REGDB_E_CLASSNOTREG;
544}
#define CO_E_NOTINITIALIZED
#define DECLSPEC_HOTPATCH
Definition: _mingw.h:240
COMPILER_DEPENDENT_UINT64 UINT64
Definition: actypes.h:131
HRESULT ensure_mta(void)
Definition: apartment.c:1297
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define RegCloseKey(hKey)
Definition: registry.h:49
FT_Library library
Definition: cffdrivr.c:660
AgileReferenceOptions
Definition: combaseapi.h:48
@ AGILEREFERENCE_DEFAULT
Definition: combaseapi.h:49
@ AGILEREFERENCE_DELAYEDMARSHAL
Definition: combaseapi.h:50
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HINSTANCE instance
Definition: main.c:40
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
Definition: combase.c:2803
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
BOOL WINAPI InternalIsProcessInitialized(void)
Definition: combase.c:391
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
HRESULT WINAPI CoMarshalInterface(IStream *stream, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:483
HRESULT WINAPI CoReleaseMarshalData(IStream *stream)
Definition: marshal.c:673
HRESULT WINAPI CoUnmarshalInterface(IStream *stream, REFIID riid, void **ppv)
Definition: marshal.c:793
HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, const WCHAR **name_elements, const IRoMetaDataLocator *meta_data_locator, GUID *iid, ROPARAMIIDHANDLE *hiid)
Definition: roapi.c:206
HRESULT WINAPI RoRegisterForApartmentShutdown(IApartmentShutdown *callback, UINT64 *identifier, APARTMENT_SHUTDOWN_REGISTRATION_COOKIE *cookie)
Definition: roapi.c:435
static HRESULT WINAPI agile_ref_QueryInterface(IAgileReference *iface, REFIID riid, void **obj)
Definition: roapi.c:268
HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance)
Definition: roapi.c:219
HRESULT WINAPI DECLSPEC_HOTPATCH RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory)
Definition: roapi.c:146
HRESULT WINAPI RoSetErrorReportingFlags(UINT32 flags)
Definition: roapi.c:522
static ULONG WINAPI agile_ref_Release(IAgileReference *iface)
Definition: roapi.c:294
HRESULT WINAPI GetRestrictedErrorInfo(IRestrictedErrorInfo **info)
Definition: roapi.c:477
HRESULT WINAPI RoInitialize(RO_INIT_TYPE type)
Definition: roapi.c:123
HRESULT WINAPI SetRestrictedErrorInfo(IRestrictedErrorInfo *info)
Definition: roapi.c:486
static HRESULT WINAPI agile_ref_Resolve(IAgileReference *iface, REFIID riid, void **obj)
Definition: roapi.c:321
static ULONG WINAPI agile_ref_AddRef(IAgileReference *iface)
Definition: roapi.c:288
HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *identifier)
Definition: roapi.c:421
BOOL WINAPI RoOriginateError(HRESULT error, HSTRING message)
Definition: roapi.c:504
static const IAgileReferenceVtbl agile_ref_vtbl
Definition: roapi.c:349
HRESULT WINAPI RoGetAgileReference(enum AgileReferenceOptions option, REFIID riid, IUnknown *obj, IAgileReference **agile_reference)
Definition: roapi.c:360
static HRESULT marshal_object_in_agile_reference(struct agile_reference *ref, REFIID riid, IUnknown *obj)
Definition: roapi.c:246
static HRESULT get_library_for_classid(const WCHAR *classid, WCHAR **out)
Definition: roapi.c:42
static struct agile_reference * impl_from_IAgileReference(IAgileReference *iface)
Definition: roapi.c:263
void WINAPI RoUninitialize(void)
Definition: roapi.c:138
HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
Definition: roapi.c:539
BOOL WINAPI RoOriginateErrorW(HRESULT error, UINT max_len, const WCHAR *message)
Definition: roapi.c:513
void WINAPI CleanupTlsOleState(void *unknown)
Definition: roapi.c:531
HRESULT WINAPI RoGetServerActivatableClasses(HSTRING name, HSTRING **classes, DWORD *count)
Definition: roapi.c:454
BOOL WINAPI RoOriginateLanguageException(HRESULT error, HSTRING message, IUnknown *language_exception)
Definition: roapi.c:495
HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONFACTORY *callbacks, UINT32 count, RO_REGISTRATION_COOKIE *cookie)
Definition: roapi.c:466
LPCWSTR WINAPI WindowsGetStringRawBuffer(HSTRING str, UINT32 *len)
Definition: string.c:263
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1605
#define GetProcAddress(x, y)
Definition: compat.h:753
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define FreeLibrary(x)
Definition: compat.h:748
#define LoadLibraryW(x)
Definition: compat.h:747
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:520
BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, LPCWSTR lpSearchStr, PACTCTX_SECTION_KEYED_DATA pInfo)
Definition: actctx.c:238
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define GUID_NULL
Definition: ks.h:106
#define REG_SZ
Definition: layer.c:22
#define error(str)
Definition: mkdosfs.c:1605
static PVOID ptr
Definition: dispmode.c:27
static IPrintDialogCallback callback
Definition: printdlg.c:326
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1026
#define REG_EXPAND_SZ
Definition: nt_native.h:1497
@ COINIT_APARTMENTTHREADED
Definition: objbase.h:279
@ COINIT_MULTITHREADED
Definition: objbase.h:280
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
struct _RO_REGISTRATION_COOKIE * RO_REGISTRATION_COOKIE
Definition: roapi.h:35
RO_INIT_TYPE
Definition: roapi.h:25
@ RO_INIT_SINGLETHREADED
Definition: roapi.h:26
@ RO_INIT_MULTITHREADED
Definition: roapi.h:27
HRESULT(WINAPI * PFNGETACTIVATIONFACTORY)(_In_ HSTRING classId, _Out_ IActivationFactory **factory)
Definition: roapi.h:69
#define calloc
Definition: rosglue.h:14
int zero
Definition: sehframes.cpp:29
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
DWORD threading_model
Definition: roapi.c:39
enum AgileReferenceOptions option
Definition: roapi.c:239
IUnknown * obj
Definition: roapi.c:242
CRITICAL_SECTION cs
Definition: roapi.c:241
IAgileReference IAgileReference_iface
Definition: roapi.c:238
IStream * marshal_stream
Definition: roapi.c:240
Definition: cookie.c:34
Definition: main.c:439
Definition: tftpd.h:60
Definition: name.c:39
Definition: getopt.h:109
Definition: send.c:48
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:687
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t UINT32
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WINAPI
Definition: msvc.h:6
#define REGDB_E_CLASSNOTREG
Definition: winerror.h:3801
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define E_NOINTERFACE
Definition: winerror.h:3479
#define REGDB_E_READREGDB
Definition: winerror.h:3797
#define CO_E_NOT_SUPPORTED
Definition: winerror.h:3510
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193