ReactOS 0.4.17-dev-444-g71ee754
AssocCreateElement.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS API tests
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Tests for AssocCreateElement
5 * COPYRIGHT: Copyright 2026 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#include <apitest.h>
9
10#define WIN32_NO_STATUS
11#include <windef.h>
12#include <winbase.h>
13#include <objbase.h>
14#include <shlwapi.h>
15#include <shlobj.h>
16#include <undocshell.h>
17#include <shlobj_undoc.h>
18#include <shlguid_undoc.h>
19#include <shlwapi_undoc.h>
20#include <shellutils.h>
21#include <versionhelpers.h>
22
23#define ASSOCQUERY_DE (ASSOCQUERY_DIRECT | ASSOCQUERY_EXISTS)
24#define ASSOCQUERY_SDE (ASSOCQUERY_STRING | ASSOCQUERY_DE)
25#define ASSOCQUERY_SDED (ASSOCQUERY_SDE | ASSOCQUERY_DWORD)
26#define ASSOCQUERY_SDEI (ASSOCQUERY_SDE | ASSOCQUERY_INDIRECT)
27#define ASSOCQUERY_SDEEV (ASSOCQUERY_SDE | ASSOCQUERY_EXTRA_VERB)
28
30
33
35{
37 return g_fnAssocCreateElement(rclsid, riid, ppvObj);
38 return AssocCreate(rclsid, riid, ppvObj);
39}
40
42{
43 const CLSID *pclsid;
45};
46
47static const CLASS_ENTRY g_Classes[] =
48{
49 { &CLSID_AssocShellElement, L"AssocShellElement" },
50 { &CLSID_AssocApplicationElement, L"AssocApplicationElement" },
51 { &CLSID_AssocProgidElement, L"AssocProgidElement" },
52 { &CLSID_AssocClsidElement, L"AssocClsidElement" },
53 { &CLSID_AssocSystemElement, L"AssocSystemElement" },
54 { &CLSID_AssocFolderElement, L"AssocFolderElement" },
55 { &CLSID_AssocStarElement, L"AssocStarElement" },
56 { &CLSID_AssocPerceivedElement, L"AssocPerceivedElement" },
57 { &CLSID_AssocClientElement, L"AssocClientElement" },
58};
59
60// Verify that CLASS_E_CLASSNOTAVAILABLE is returned when an unknown CLSID is passed
61static void Test_InvalidClsid(void)
62{
63 IUnknown *pUnk = (IUnknown *)(LONG_PTR)0xdeadbeef;
66 ok(pUnk == NULL, "pUnk should be NULL, got %p\n", pUnk);
67}
68
69// For all public CLSIDs, verify that:
70// - instantiation succeeds;
71// - IPersist / IPersistString2 / IObjectWithQuerySourceOld can be obtained; and
72// - GetClassID returns the CLSID passed during instantiation.
74{
75 HRESULT hr;
76
77 for (size_t i = 0; i < _countof(g_Classes); ++i)
78 {
79 const CLASS_ENTRY& entry = g_Classes[i];
80
81 if (g_bVistaPlus)
82 {
83 IAssociationElement *pElement = NULL;
85 IID_PPV_ARG(IAssociationElement, &pElement));
86 ok(hr == S_OK, "[%s] AssocCreateElement failed: 0x%08lX\n",
87 wine_dbgstr_w(entry.pszName), hr);
88 if (!pElement)
89 continue;
90
91 IPersist *pPersist = NULL;
92 hr = pElement->QueryInterface(IID_PPV_ARG(IPersist, &pPersist));
93 ok(hr == S_OK, "[%s] QI(IPersist) failed: 0x%08lX\n",
94 wine_dbgstr_w(entry.pszName), hr);
95 if (pPersist)
96 {
98 hr = pPersist->GetClassID(&clsid);
99 ok(hr == S_OK, "[%s] GetClassID failed: 0x%08lX\n",
100 wine_dbgstr_w(entry.pszName), hr);
101 ok(IsEqualCLSID(clsid, *entry.pclsid),
102 "[%s] GetClassID returned an unexpected CLSID\n", wine_dbgstr_w(entry.pszName));
103 pPersist->Release();
104 }
105
106 IPersistString2 *pPS2 = NULL;
107 hr = pElement->QueryInterface(IID_PPV_ARG(IPersistString2, &pPS2));
108 ok(hr == S_OK, "[%s] QI(IPersistString2) failed: 0x%08lX\n",
109 wine_dbgstr_w(entry.pszName), hr);
110 if (pPS2)
111 pPS2->Release();
112
113 IObjectWithQuerySourceOld *pOWQS = NULL;
114 hr = pElement->QueryInterface(IID_PPV_ARG(IObjectWithQuerySourceOld, &pOWQS));
115 ok(hr == S_OK, "[%s] QI(IObjectWithQuerySourceOld) failed: 0x%08lX\n",
116 wine_dbgstr_w(entry.pszName), hr);
117 if (pOWQS)
118 pOWQS->Release();
119
120 pElement->Release();
121 }
122 else
123 {
124 IAssociationElementOld *pElement = NULL;
125 hr = MyAssocCreateElement(*entry.pclsid,
126 IID_PPV_ARG(IAssociationElementOld, &pElement));
127 ok(hr == S_OK, "[%s] AssocCreateElement failed: 0x%08lX\n",
128 wine_dbgstr_w(entry.pszName), hr);
129 if (!pElement)
130 continue;
131
132 IPersist *pPersist = NULL;
133 hr = pElement->QueryInterface(IID_PPV_ARG(IPersist, &pPersist));
134 ok(hr == S_OK, "[%s] QI(IPersist) failed: 0x%08lX\n",
135 wine_dbgstr_w(entry.pszName), hr);
136 if (pPersist)
137 {
138 CLSID clsid;
139 hr = pPersist->GetClassID(&clsid);
140 ok(hr == S_OK, "[%s] GetClassID failed: 0x%08lX\n",
141 wine_dbgstr_w(entry.pszName), hr);
142 ok(IsEqualCLSID(clsid, *entry.pclsid),
143 "[%s] GetClassID returned an unexpected CLSID\n", wine_dbgstr_w(entry.pszName));
144 pPersist->Release();
145 }
146
147 IPersistString2 *pPS2 = NULL;
148 hr = pElement->QueryInterface(IID_PPV_ARG(IPersistString2, &pPS2));
149 ok(hr == S_OK, "[%s] QI(IPersistString2) failed: 0x%08lX\n",
150 wine_dbgstr_w(entry.pszName), hr);
151 if (pPS2)
152 pPS2->Release();
153
154 IObjectWithQuerySourceOld *pOWQS = NULL;
155 hr = pElement->QueryInterface(IID_PPV_ARG(IObjectWithQuerySourceOld, &pOWQS));
156 ok(hr == S_OK, "[%s] QI(IObjectWithQuerySourceOld) failed: 0x%08lX\n",
157 wine_dbgstr_w(entry.pszName), hr);
158 if (pOWQS)
159 pOWQS->Release();
160
161 pElement->Release();
162 }
163 }
164}
165
166// Verify that calling QueryString before SetString results in E_INVALIDARG
167static void Test_QueryBeforeInit(void)
168{
169 if (g_bVistaPlus)
170 {
171 IAssociationElement *pElement = NULL;
172 HRESULT hr = MyAssocCreateElement(CLSID_AssocShellElement,
173 IID_PPV_ARG(IAssociationElement, &pElement));
174 ok(hr == S_OK, "AssocCreateElement failed: 0x%08lX\n", hr);
175 if (!pElement)
176 return;
177
178 PWSTR psz = NULL;
180 {
181 hr = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
182 }
184 {
185 hr = 0xDEAD;
186 }
187 _SEH2_END;
188
189 ok(hr == 0xDEAD, "hr was 0x%08lX\n", hr);
190
191 pElement->Release();
192 }
193 else
194 {
195 IAssociationElementOld *pElement = NULL;
196 HRESULT hr = MyAssocCreateElement(CLSID_AssocShellElement,
197 IID_PPV_ARG(IAssociationElementOld, &pElement));
198 ok(hr == S_OK, "AssocCreateElement failed: 0x%08lX\n", hr);
199 if (!pElement)
200 return;
201
202 PWSTR psz = NULL;
203 hr = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
205 ok(psz == NULL, "psz should be NULL\n");
206
207 pElement->Release();
208 }
209}
210
211// Verify that calling SetString twice results in E_UNEXPECTED
212static void Test_DoubleSetString(void)
213{
214 IPersistString2 *pPS2 = NULL;
215 HRESULT hr = MyAssocCreateElement(CLSID_AssocShellElement,
216 IID_PPV_ARG(IPersistString2, &pPS2));
217 ok(hr == S_OK, "AssocCreateElement failed: 0x%08lX\n", hr);
218 if (!pPS2)
219 return;
220
221 hr = pPS2->SetString(L"txtfile");
222 ok(hr == S_OK, "First SetString failed: 0x%08lX\n", hr);
223
224 hr = pPS2->SetString(L"txtfile");
225 if (g_bVistaPlus)
226 ok_hex(hr, S_OK);
227 else
229
230 pPS2->Release();
231}
232
233// Retrieve FriendlyTypeName / DefaultIcon using CLSID_AssocShellElement + SetString(L"txtfile")
235{
236 IPersistString2 *pPS2 = NULL;
237 HRESULT hr = MyAssocCreateElement(CLSID_AssocShellElement,
238 IID_PPV_ARG(IPersistString2, &pPS2));
239 ok(hr == S_OK, "AssocCreateElement(AssocShellElement) failed: 0x%08lX\n", hr);
240 if (!pPS2)
241 return;
242
243 hr = pPS2->SetString(L"txtfile");
244 if (hr != S_OK)
245 {
246 skip("\"txtfile\" ProgID was not found in HKCR, skipping\n");
247 pPS2->Release();
248 return;
249 }
250
251 if (g_bVistaPlus)
252 {
253 IAssociationElement *pElement = NULL;
254 hr = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElement, &pElement));
255 ok(hr == S_OK, "QI(IAssociationElement) failed: 0x%08lX\n", hr);
256 if (pElement)
257 {
258 PWSTR psz = NULL;
259 hr = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
260 ok(hr == S_OK, "QueryString(FriendlyTypeName) failed: 0x%08lX\n", hr);
261 ok(psz != NULL && psz[0] != UNICODE_NULL, "Friendly type name is empty\n");
262 if (psz)
263 {
264 trace("txtfile FriendlyTypeName: %s\n", wine_dbgstr_w(psz));
265 CoTaskMemFree(psz);
266 }
267
268 hr = pElement->QueryExists((ASSOCQUERY_SDE | 0x1), NULL);
269 ok(hr == S_OK, "QueryExists(DefaultIcon) failed: 0x%08lX\n", hr);
270
271 pElement->Release();
272 }
273 }
274 else
275 {
276 IAssociationElementOld *pElement = NULL;
277 hr = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElementOld, &pElement));
278 ok(hr == S_OK, "QI(IAssociationElementOld) failed: 0x%08lX\n", hr);
279 if (pElement)
280 {
281 PWSTR psz = NULL;
282 hr = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
283 ok(hr == S_OK, "QueryString(FriendlyTypeName) failed: 0x%08lX\n", hr);
284 ok(psz != NULL && psz[0] != UNICODE_NULL, "Friendly type name is empty\n");
285 if (psz)
286 {
287 trace("txtfile FriendlyTypeName: %s\n", wine_dbgstr_w(psz));
288 CoTaskMemFree(psz);
289 }
290
291 hr = pElement->QueryExists((ASSOCQUERY_SDE | 0x1), NULL);
292 ok(hr == S_OK, "QueryExists(DefaultIcon) failed: 0x%08lX\n", hr);
293
294 pElement->Release();
295 }
296 }
297
298 pPS2->Release();
299}
300
301
302// A pattern where you create a custom registry source using QuerySourceCreateFromKey
303// instead of SetString, and attach it directly via IObjectWithQuerySource[Old]::SetSource.
305{
306 HRESULT hr;
307 if (g_bVistaPlus)
308 {
309 IQuerySource *pSource = NULL;
311 IID_PPV_ARG(IQuerySource, &pSource));
312 if (FAILED(hr))
313 {
314 skip("QuerySourceCreateFromKey(txtfile) failed: 0x%08lX\n", hr);
315 return;
316 }
317
318 IObjectWithQuerySource *pOWQS = NULL;
319 hr = MyAssocCreateElement(CLSID_AssocShellElement,
320 IID_PPV_ARG(IObjectWithQuerySource, &pOWQS));
321 ok(hr == S_OK, "AssocCreateElement(AssocShellElement) failed: 0x%08lX\n", hr);
322 if (pOWQS)
323 {
324 hr = pOWQS->SetSource(pSource);
325 ok(hr == S_OK, "SetSource failed: 0x%08lX\n", hr);
326
327 IAssociationElement *pElement = NULL;
328 hr = pOWQS->QueryInterface(IID_PPV_ARG(IAssociationElement, &pElement));
329 ok(hr == S_OK, "QI(IAssociationElementOld) failed: 0x%08lX\n", hr);
330 if (pElement)
331 {
332 PWSTR psz = NULL;
333 hr = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
334 ok(hr == S_OK, "QueryString(FriendlyTypeName) failed: 0x%08lX\n", hr);
335 if (psz)
336 {
337 trace("txtfile (explicit source) FriendlyTypeName: %s\n",
338 wine_dbgstr_w(psz));
339 CoTaskMemFree(psz);
340 }
341 pElement->Release();
342 }
343
344 // The second call to SetSource should result in E_UNEXPECTED
345 hr = pOWQS->SetSource(pSource);
347
348 pOWQS->Release();
349 }
350
351 if (pSource)
352 pSource->Release();
353 }
354 else
355 {
356 IQuerySourceOld *pSource = NULL;
358 IID_PPV_ARG(IQuerySourceOld, &pSource));
359 if (FAILED(hr))
360 {
361 skip("QuerySourceCreateFromKey(txtfile) failed: 0x%08lX\n", hr);
362 return;
363 }
364
365 IObjectWithQuerySourceOld *pOWQS = NULL;
366 hr = MyAssocCreateElement(CLSID_AssocShellElement,
367 IID_PPV_ARG(IObjectWithQuerySourceOld, &pOWQS));
368 ok(hr == S_OK, "AssocCreateElement(AssocShellElement) failed: 0x%08lX\n", hr);
369 if (pOWQS)
370 {
371 hr = pOWQS->SetSource(pSource);
372 ok(hr == S_OK, "SetSource failed: 0x%08lX\n", hr);
373
374 IAssociationElementOld *pElement = NULL;
375 hr = pOWQS->QueryInterface(IID_PPV_ARG(IAssociationElementOld, &pElement));
376 ok(hr == S_OK, "QI(IAssociationElementOld) failed: 0x%08lX\n", hr);
377 if (pElement)
378 {
379 PWSTR psz = NULL;
380 hr = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
381 ok(hr == S_OK, "QueryString(FriendlyTypeName) failed: 0x%08lX\n", hr);
382 if (psz)
383 {
384 trace("txtfile (explicit source) FriendlyTypeName: %s\n",
385 wine_dbgstr_w(psz));
386 CoTaskMemFree(psz);
387 }
388 pElement->Release();
389 }
390
391 // The second call to SetSource should result in E_UNEXPECTED
392 hr = pOWQS->SetSource(pSource);
394
395 pOWQS->Release();
396 }
397
398 if (pSource)
399 pSource->Release();
400 }
401}
402
403// Verify resolution from the file extension using CLSID_AssocProgidElement + SetString(L".txt")
405{
406 IPersistString2 *pPS2 = NULL;
407 HRESULT hr = MyAssocCreateElement(CLSID_AssocProgidElement,
408 IID_PPV_ARG(IPersistString2, &pPS2));
409 ok(hr == S_OK, "AssocCreateElement(AssocProgidElement) failed: 0x%08lX\n", hr);
410 if (!pPS2)
411 return;
412
413 hr = pPS2->SetString(L".txt");
414 ok(hr == S_OK || hr == S_FALSE, "SetString(.txt) failed: 0x%08lX\n", hr);
415
416 if (g_bVistaPlus)
417 {
418 IAssociationElement *pElement = NULL;
419 HRESULT hr2 = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElement, &pElement));
420 ok(hr2 == S_OK, "QI(IAssociationElement) failed: 0x%08lX\n", hr2);
421 if (pElement)
422 pElement->Release();
423 }
424 else
425 {
426 IAssociationElementOld *pElement = NULL;
427 HRESULT hr2 = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElementOld, &pElement));
428 ok(hr2 == S_OK, "QI(IAssociationElementOld) failed: 0x%08lX\n", hr2);
429 if (pElement)
430 {
431 PWSTR psz = NULL;
432 HRESULT hr3 = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
433 ok(hr3 == S_OK, "QueryString(FriendlyTypeName) for .txt failed: 0x%08lX\n", hr3);
434 if (psz)
435 {
436 trace(".txt FriendlyTypeName: %s\n", wine_dbgstr_w(psz));
437 CoTaskMemFree(psz);
438 }
439 pElement->Release();
440 }
441 }
442
443 pPS2->Release();
444}
445
446// CLSID_AssocStarElement: Verify that the generic "File" name can be retrieved even for
447// unknown file extensions
449{
450 IPersistString2 *pPS2 = NULL;
451 HRESULT hr = MyAssocCreateElement(CLSID_AssocStarElement,
452 IID_PPV_ARG(IPersistString2, &pPS2));
453 ok(hr == S_OK, "AssocCreateElement(AssocStarElement) failed: 0x%08lX\n", hr);
454 if (!pPS2)
455 return;
456
457 hr = pPS2->SetString(L".rostestunknownext");
458 ok(hr == S_OK, "SetString failed: 0x%08lX\n", hr);
459
460 if (g_bVistaPlus)
461 {
462 IAssociationElement *pElement = NULL;
463 HRESULT hr2 = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElement, &pElement));
464 ok(hr2 == S_OK, "QI(IAssociationElement) failed: 0x%08lX\n", hr2);
465 if (pElement)
466 {
467 PWSTR psz = NULL;
468 HRESULT hr3 = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
469 ok(hr3 == S_OK, "QueryString for unknown extension failed: 0x%08lX\n", hr3);
470 ok(psz != NULL && psz[0] != UNICODE_NULL, "Generic type name is empty\n");
471 if (psz)
472 {
473 trace("Generic file type name: %s\n", wine_dbgstr_w(psz));
474 CoTaskMemFree(psz);
475 }
476 pElement->Release();
477 }
478 }
479 else
480 {
481 IAssociationElementOld *pElement = NULL;
482 HRESULT hr2 = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElementOld, &pElement));
483 ok(hr2 == S_OK, "QI(IAssociationElementOld) failed: 0x%08lX\n", hr2);
484 if (pElement)
485 {
486 PWSTR psz = NULL;
487 HRESULT hr3 = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
488 ok(hr3 == S_OK, "QueryString for unknown extension failed: 0x%08lX\n", hr3);
489 ok(psz != NULL && psz[0] != UNICODE_NULL, "Generic type name is empty\n");
490 if (psz)
491 {
492 trace("Generic file type name: %s\n", wine_dbgstr_w(psz));
493 CoTaskMemFree(psz);
494 }
495 pElement->Release();
496 }
497 }
498
499 pPS2->Release();
500}
501
502// CLSID_AssocFolderElement: Always opens HKCR\Folder
503static void Test_FolderElement(void)
504{
505 IPersistString2 *pPS2 = NULL;
506 HRESULT hr = MyAssocCreateElement(CLSID_AssocFolderElement,
507 IID_PPV_ARG(IPersistString2, &pPS2));
508 ok(hr == S_OK, "AssocCreateElement(AssocFolderElement) failed: 0x%08lX\n", hr);
509 if (!pPS2)
510 return;
511
512 hr = pPS2->SetString(L"");
513 if (g_bVistaPlus)
514 ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), "SetString hr: 0x%08lX\n", hr);
515 else
516 ok(hr == S_OK, "SetString failed: 0x%08lX\n", hr);
517
518 if (g_bVistaPlus)
519 {
520 IAssociationElement *pElement = NULL;
521 HRESULT hr2 = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElement, &pElement));
522 ok(hr2 == S_OK, "QI(IAssociationElement) failed: 0x%08lX\n", hr2);
523 if (pElement)
524 {
525 PWSTR psz = NULL;
526 HRESULT hr3 = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
527 ok(hr3 == S_OK, "QueryString(Folder) failed: 0x%08lX\n", hr3);
528 if (psz)
529 {
530 trace("Folder type name: %s\n", wine_dbgstr_w(psz));
531 CoTaskMemFree(psz);
532 }
533 pElement->Release();
534 }
535 }
536 else
537 {
538 IAssociationElementOld *pElement = NULL;
539 HRESULT hr2 = pPS2->QueryInterface(IID_PPV_ARG(IAssociationElementOld, &pElement));
540 ok(hr2 == S_OK, "QI(IAssociationElementOld) failed: 0x%08lX\n", hr2);
541 if (pElement)
542 {
543 PWSTR psz = NULL;
544 HRESULT hr3 = pElement->QueryString(ASSOCQUERY_SDEI, NULL, &psz);
545 ok(hr3 == S_OK, "QueryString(Folder) failed: 0x%08lX\n", hr3);
546 if (psz)
547 {
548 trace("Folder type name: %s\n", wine_dbgstr_w(psz));
549 CoTaskMemFree(psz);
550 }
551 pElement->Release();
552 }
553 }
554
555 pPS2->Release();
556}
557
559{
561
562 HINSTANCE hShell32 = GetModuleHandleW(L"shell32.dll");
566 trace("shell32!AssocCreateElement not found. Using shlwapi!AssocCreate instead...\n");
567
568 HRESULT hrCo = CoInitialize(NULL);
569
579
580 if (SUCCEEDED(hrCo))
582}
#define ASSOCQUERY_SDE
static void Test_QueryBeforeInit(void)
static void Test_StarElement_UnknownExt(void)
static void Test_QueryInterfaceAndClassID(void)
static BOOL g_bVistaPlus
static void Test_InvalidClsid(void)
static const CLASS_ENTRY g_Classes[]
static void Test_ShellElement_ExplicitSource(void)
static void Test_ProgidElement_DotTxt(void)
static HRESULT MyAssocCreateElement(REFCLSID rclsid, REFIID riid, PVOID *ppvObj)
static void Test_FolderElement(void)
#define ASSOCQUERY_SDEI
static void Test_DoubleSetString(void)
static FN_AssocCreateElement g_fnAssocCreateElement
static void Test_ShellElement_txtfile(void)
HRESULT(WINAPI * FN_AssocCreateElement)(REFCLSID, REFIID, PVOID *)
#define ok_hex(expression, result)
Definition: atltest.h:94
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
Definition: assoc.c:104
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
Definition: dplayx.c:30
#define L(x)
Definition: resources.c:13
EXTERN_C HRESULT WINAPI AssocCreateElement(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ PVOID *ppvObj)
Definition: elements.cpp:1635
unsigned int BOOL
Definition: ntddk_ex.h:94
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
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
REFIID riid
Definition: atlbase.h:39
HRESULT GetClassID([out] CLSID *pClassID)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
#define wine_dbgstr_w
Definition: kernel32.h:34
static HMODULE hShell32
Definition: string.c:34
const CLSID * clsid
Definition: msctf.cpp:50
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define UNICODE_NULL
#define CLSID_NULL
Definition: guiddef.h:99
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:104
#define _SEH2_END
Definition: pseh2_64.h:194
#define _SEH2_TRY
Definition: pseh2_64.h:93
EXTERN_C HRESULT WINAPI QuerySourceCreateFromKey(_In_ HKEY hKey, _In_opt_ PCWSTR lpSubKey, _In_ BOOL bCreate, _In_ REFIID riid, _Outptr_ PVOID *ppv)
Definition: querysrc.cpp:499
#define _countof(array)
Definition: sndvol32.h:70
const CLSID * pclsid
PCWSTR pszName
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
VERSIONHELPERAPI IsWindowsVistaOrGreater()
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define E_UNEXPECTED
Definition: winerror.h:3528
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3772
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define IID_PPV_ARG(Itype, ppType)