ReactOS 0.4.16-dev-2491-g3dc6630
container.c
Go to the documentation of this file.
1/*
2 * Unit tests for IDxDiagContainer
3 *
4 * Copyright 2010 Andrew Nguyen
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 <stdio.h>
24#include "wine/dxdiag.h"
25#include "oleauto.h"
26#include "wine/test.h"
27
29{
30 const WCHAR *prop;
32};
33
34static IDxDiagProvider *pddp;
35static IDxDiagContainer *pddc;
36
37static const WCHAR DxDiag_SystemInfo[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','I','n','f','o',0};
38static const WCHAR DxDiag_DisplayDevices[] = {'D','x','D','i','a','g','_','D','i','s','p','l','a','y','D','e','v','i','c','e','s',0};
39static const WCHAR DxDiag_SoundDevices[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d','.',
40 'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0};
41static const WCHAR DxDiag_SoundCaptureDevices[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d','.',
42 'D','x','D','i','a','g','_','S','o','u','n','d','C','a','p','t','u','r','e',
43 'D','e','v','i','c','e','s',0};
44
46{
47 HRESULT hr;
49
50 hr = CoCreateInstance(&CLSID_DxDiagProvider, NULL, CLSCTX_INPROC_SERVER,
51 &IID_IDxDiagProvider, (LPVOID*)&pddp);
52 if (SUCCEEDED(hr))
53 {
54 params.dwSize = sizeof(params);
55 params.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION;
56 params.bAllowWHQLChecks = FALSE;
57 params.pReserved = NULL;
59 if (SUCCEEDED(hr))
60 {
62 if (SUCCEEDED(hr))
63 return TRUE;
64 }
66 }
67 return FALSE;
68}
69
71{
72 HRESULT hr;
74
76 {
77 skip("Unable to create the root IDxDiagContainer\n");
78 return;
79 }
80
83 "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08x\n", hr);
84
86 ok(hr == S_OK,
87 "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
88 if (hr == S_OK)
89 ok(count != 0, "Expected the number of child containers for the root container to be non-zero\n");
90
93}
94
95static void test_GetNumberOfProps(void)
96{
97 HRESULT hr;
99
101 {
102 skip("Unable to create the root IDxDiagContainer\n");
103 return;
104 }
105
107 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08x\n", hr);
108
110 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
111 if (hr == S_OK)
112 ok(count == 0, "Expected the number of properties for the root container to be zero\n");
113
116}
117
119{
120 HRESULT hr;
121 WCHAR container[256];
122 DWORD maxcount, index;
123 static const WCHAR testW[] = {'t','e','s','t',0};
124 static const WCHAR zerotestW[] = {0,'e','s','t',0};
125
127 {
128 skip("Unable to create the root IDxDiagContainer\n");
129 return;
130 }
131
132 /* Test various combinations of invalid parameters. */
134 ok(hr == E_INVALIDARG,
135 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
136
138 ok(hr == E_INVALIDARG,
139 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
140
141 /* Test the conditions in which the output buffer can be modified. */
142 memcpy(container, testW, sizeof(testW));
144 ok(hr == E_INVALIDARG,
145 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
146 ok(!memcmp(container, testW, sizeof(testW)),
147 "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container));
148
149 memcpy(container, testW, sizeof(testW));
151 ok(hr == E_INVALIDARG,
152 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
153 ok(!memcmp(container, testW, sizeof(testW)),
154 "Expected the container buffer to be untouched, got %s\n", wine_dbgstr_w(container));
155
156 memcpy(container, testW, sizeof(testW));
158 ok(hr == E_INVALIDARG,
159 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08x\n", hr);
160 ok(!memcmp(container, zerotestW, sizeof(zerotestW)),
161 "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container));
162
164 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
165 if (FAILED(hr))
166 {
167 skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
168 goto cleanup;
169 }
170
171 trace("Starting child container enumeration of the root container:\n");
172
173 /* We should be able to enumerate as many child containers as the value
174 * that IDxDiagContainer::GetNumberOfChildContainers returns. */
175 for (index = 0; index <= maxcount; index++)
176 {
177 /* A buffer size of 1 is unlikely to be valid, as only a null terminator
178 * could be stored, and it is unlikely that a container name could be empty. */
179 DWORD buffersize = 1;
180 memcpy(container, testW, sizeof(testW));
182 if (hr == E_INVALIDARG)
183 {
184 /* We should get here when index is one more than the maximum index value. */
185 ok(maxcount == index,
186 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG "
187 "on the last index %d, got 0x%08x\n", index, hr);
188 ok(container[0] == '\0',
189 "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container));
190 break;
191 }
193 {
194 WCHAR temp[256];
195
196 ok(container[0] == '\0',
197 "Expected the container buffer string to be empty, got %s\n", wine_dbgstr_w(container));
198
199 /* Get the container name to compare against. */
201 ok(hr == S_OK,
202 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
203
204 /* Show that the DirectX SDK's stipulation that the buffer be at
205 * least 256 characters long is a mere suggestion, and smaller sizes
206 * can be acceptable also. IDxDiagContainer::EnumChildContainerNames
207 * doesn't provide a way of getting the exact size required, so the
208 * buffersize value will be iterated to at most 256 characters. */
209 for (buffersize = 2; buffersize <= 256; buffersize++)
210 {
211 memcpy(container, testW, sizeof(testW));
214 break;
215
216 ok(!memcmp(temp, container, sizeof(WCHAR)*(buffersize - 1)),
217 "Expected truncated container name string, got %s\n", wine_dbgstr_w(container));
218 }
219
220 ok(hr == S_OK,
221 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, "
222 "got hr = 0x%08x, buffersize = %d\n", hr, buffersize);
223 if (hr == S_OK)
224 trace("pddc[%d] = %s, length = %d\n", index, wine_dbgstr_w(container), buffersize);
225 }
226 else
227 {
228 ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr);
229 break;
230 }
231 }
232
233cleanup:
236}
237
238static void test_GetChildContainer(void)
239{
240 HRESULT hr;
241 WCHAR container[256] = {0};
242 IDxDiagContainer *child;
243
245 {
246 skip("Unable to create the root IDxDiagContainer\n");
247 return;
248 }
249
250 /* Test various combinations of invalid parameters. */
252 ok(hr == E_INVALIDARG,
253 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
254
255 child = (void*)0xdeadbeef;
257 ok(hr == E_INVALIDARG,
258 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
259 ok(child == (void*)0xdeadbeef, "Expected output pointer to be unchanged, got %p\n", child);
260
262 ok(hr == E_INVALIDARG,
263 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
264
265 child = (void*)0xdeadbeef;
267 ok(hr == E_INVALIDARG,
268 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
269 ok(child == NULL, "Expected output pointer to be NULL, got %p\n", child);
270
271 /* Get the name of a suitable child container. */
273 ok(hr == S_OK,
274 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
275 if (FAILED(hr))
276 {
277 skip("IDxDiagContainer::EnumChildContainerNames failed\n");
278 goto cleanup;
279 }
280
281 child = (void*)0xdeadbeef;
283 ok(hr == S_OK,
284 "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
285 ok(child != NULL && child != (void*)0xdeadbeef, "Expected a valid output pointer, got %p\n", child);
286
287 if (SUCCEEDED(hr))
288 {
289 IDxDiagContainer *ptr;
290
291 /* Show that IDxDiagContainer::GetChildContainer returns a different pointer
292 * for multiple calls for the same container name. */
294 ok(hr == S_OK,
295 "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
296 if (SUCCEEDED(hr))
297 ok(ptr != child, "Expected the two pointers (%p vs. %p) to be unequal\n", child, ptr);
298
301 }
302
303cleanup:
306}
307
308static void test_dot_parsing(void)
309{
310 HRESULT hr;
311 WCHAR containerbufW[256] = {0}, childbufW[256] = {0};
313 size_t i;
314 static const struct
315 {
316 const char *format;
317 const HRESULT expect;
318 } test_strings[] = {
319 { "%s.%s", S_OK },
320 { "%s.%s.", S_OK },
321 { ".%s.%s", E_INVALIDARG },
322 { "%s.%s..", E_INVALIDARG },
323 { ".%s.%s.", E_INVALIDARG },
324 { "..%s.%s", E_INVALIDARG },
325 };
326
328 {
329 skip("Unable to create the root IDxDiagContainer\n");
330 return;
331 }
332
333 /* Find a container with a child container of its own. */
335 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
336 if (FAILED(hr))
337 {
338 skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
339 goto cleanup;
340 }
341
342 for (index = 0; index < count; index++)
343 {
344 IDxDiagContainer *child;
345
346 hr = IDxDiagContainer_EnumChildContainerNames(pddc, index, containerbufW, ARRAY_SIZE(containerbufW));
347 ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
348 if (FAILED(hr))
349 {
350 skip("IDxDiagContainer::EnumChildContainerNames failed\n");
351 goto cleanup;
352 }
353
355 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
356
357 if (SUCCEEDED(hr))
358 {
359 hr = IDxDiagContainer_EnumChildContainerNames(child, 0, childbufW, ARRAY_SIZE(childbufW));
360 ok(hr == S_OK || hr == E_INVALIDARG,
361 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr);
363
364 if (SUCCEEDED(hr))
365 break;
366 }
367 }
368
369 if (!*containerbufW || !*childbufW)
370 {
371 skip("Unable to find a suitable container\n");
372 goto cleanup;
373 }
374
375 trace("Testing IDxDiagContainer::GetChildContainer dot parsing with container %s and child container %s.\n",
376 wine_dbgstr_w(containerbufW), wine_dbgstr_w(childbufW));
377
378 for (i = 0; i < ARRAY_SIZE(test_strings); i++)
379 {
380 IDxDiagContainer *child;
381 char containerbufA[256];
382 char childbufA[256];
383 char dotbufferA[255 + 255 + 3 + 1];
384 WCHAR dotbufferW[255 + 255 + 3 + 1]; /* containerbuf + childbuf + dots + null terminator */
385
386 WideCharToMultiByte(CP_ACP, 0, containerbufW, -1, containerbufA, sizeof(containerbufA), NULL, NULL);
387 WideCharToMultiByte(CP_ACP, 0, childbufW, -1, childbufA, sizeof(childbufA), NULL, NULL);
388 sprintf(dotbufferA, test_strings[i].format, containerbufA, childbufA);
389 MultiByteToWideChar(CP_ACP, 0, dotbufferA, -1, dotbufferW, ARRAY_SIZE(dotbufferW));
390
391 trace("Trying container name %s\n", wine_dbgstr_w(dotbufferW));
393 ok(hr == test_strings[i].expect,
394 "Expected IDxDiagContainer::GetChildContainer to return 0x%08x for %s, got 0x%08x\n",
395 test_strings[i].expect, wine_dbgstr_w(dotbufferW), hr);
396 if (SUCCEEDED(hr))
398 }
399
400cleanup:
403}
404
405static void test_EnumPropNames(void)
406{
407 HRESULT hr;
408 WCHAR container[256], property[256];
409 IDxDiagContainer *child = NULL;
410 DWORD count, index, propcount;
411 static const WCHAR testW[] = {'t','e','s','t',0};
412
414 {
415 skip("Unable to create the root IDxDiagContainer\n");
416 return;
417 }
418
419 /* Find a container with a non-zero number of properties. */
421 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
422 if (FAILED(hr))
423 {
424 skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
425 goto cleanup;
426 }
427
428 for (index = 0; index < count; index++)
429 {
431 ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
432 if (FAILED(hr))
433 {
434 skip("IDxDiagContainer::EnumChildContainerNames failed\n");
435 goto cleanup;
436 }
437
439 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
440
441 if (SUCCEEDED(hr))
442 {
444 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
445
446 if (!propcount)
447 {
449 child = NULL;
450 }
451 else
452 break;
453 }
454 }
455
456 if (!child)
457 {
458 skip("Unable to find a container with non-zero property count\n");
459 goto cleanup;
460 }
461
463 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr);
464
465 memcpy(property, testW, sizeof(testW));
467 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr);
468 ok(!memcmp(property, testW, sizeof(testW)),
469 "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
470
471 memcpy(property, testW, sizeof(testW));
473 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08x\n", hr);
474 ok(!memcmp(property, testW, sizeof(testW)),
475 "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
476
477 trace("Starting property enumeration of the %s container:\n", wine_dbgstr_w(container));
478
479 /* We should be able to enumerate as many properties as the value that
480 * IDxDiagContainer::GetNumberOfProps returns. */
481 for (index = 0; index <= propcount; index++)
482 {
483 /* A buffer size of 1 is unlikely to be valid, as only a null terminator
484 * could be stored, and it is unlikely that a property name could be empty. */
485 DWORD buffersize = 1;
486
487 memcpy(property, testW, sizeof(testW));
489 if (hr == E_INVALIDARG)
490 {
491 /* We should get here when index is one more than the maximum index value. */
492 ok(propcount == index,
493 "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG "
494 "on the last index %d, got 0x%08x\n", index, hr);
495 ok(!memcmp(property, testW, sizeof(testW)),
496 "Expected the property buffer to be unchanged, got %s\n", wine_dbgstr_w(property));
497 break;
498 }
500 {
501 WCHAR temp[256];
502
503 ok(property[0] == '\0',
504 "Expected the property buffer string to be empty, got %s\n", wine_dbgstr_w(property));
506 ok(hr == S_OK,
507 "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08x\n", hr);
508
509 /* Show that the DirectX SDK's stipulation that the buffer be at
510 * least 256 characters long is a mere suggestion, and smaller sizes
511 * can be acceptable also. IDxDiagContainer::EnumPropNames doesn't
512 * provide a way of getting the exact size required, so the buffersize
513 * value will be iterated to at most 256 characters. */
514 for (buffersize = 2; buffersize <= 256; buffersize++)
515 {
516 memcpy(property, testW, sizeof(testW));
519 break;
520
521 ok(!memcmp(temp, property, sizeof(WCHAR)*(buffersize - 1)),
522 "Expected truncated property name string, got %s\n", wine_dbgstr_w(property));
523 }
524
525 ok(hr == S_OK,
526 "Expected IDxDiagContainer::EnumPropNames to return S_OK, "
527 "got hr = 0x%08x, buffersize = %d\n", hr, buffersize);
528 if (hr == S_OK)
529 trace("child[%d] = %s, length = %d\n", index, wine_dbgstr_w(property), buffersize);
530 }
531 else
532 {
533 ok(0, "IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08x\n", hr);
534 break;
535 }
536 }
537
539
540cleanup:
543}
544
545static void test_GetProp(void)
546{
547 HRESULT hr;
548 WCHAR container[256], property[256];
549 IDxDiagContainer *child = NULL;
551 VARIANT var;
552 SAFEARRAY *sa;
553 SAFEARRAYBOUND bound;
554 ULONG ref;
555 static const WCHAR emptyW[] = {0};
556 static const WCHAR testW[] = {'t','e','s','t',0};
557
559 {
560 skip("Unable to create the root IDxDiagContainer\n");
561 return;
562 }
563
564 /* Find a container with a property. */
566 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
567 if (FAILED(hr))
568 {
569 skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
570 goto cleanup;
571 }
572
573 for (index = 0; index < count; index++)
574 {
576 ok(hr == S_OK, "Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
577 if (FAILED(hr))
578 {
579 skip("IDxDiagContainer::EnumChildContainerNames failed\n");
580 goto cleanup;
581 }
582
584 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
585
586 if (SUCCEEDED(hr))
587 {
589 ok(hr == S_OK || hr == E_INVALIDARG,
590 "Expected IDxDiagContainer::EnumPropNames to return S_OK or E_INVALIDARG, got 0x%08x\n", hr);
591
592 if (SUCCEEDED(hr))
593 break;
594 else
595 {
597 child = NULL;
598 }
599 }
600 }
601
602 if (!child)
603 {
604 skip("Unable to find a suitable container\n");
605 goto cleanup;
606 }
607
609 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
610
611 V_VT(&var) = 0xdead;
613 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
614 ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
615
617 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
618
619 V_VT(&var) = 0xdead;
621 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
622 ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
623
625 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
626
627 V_VT(&var) = 0xdead;
629 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08x\n", hr);
630 ok(V_VT(&var) == 0xdead, "Expected the variant to be untouched, got %u\n", V_VT(&var));
631
634 ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
635 ok(V_VT(&var) != VT_EMPTY, "Expected the variant to be modified, got %d\n", V_VT(&var));
636
637 /* Since the documentation for IDxDiagContainer::GetProp claims that the
638 * function reports return values from VariantCopy, try to exercise failure
639 * paths in handling the destination variant. */
640
641 /* Try an invalid variant type. */
642 V_VT(&var) = 0xdead;
644 ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
645 ok(V_VT(&var) != 0xdead, "Expected the variant to be modified, got %d\n", V_VT(&var));
646
647 /* Try passing a variant with a locked SAFEARRAY. */
648 bound.cElements = 1;
649 bound.lLbound = 0;
650 sa = SafeArrayCreate(VT_UI1, 1, &bound);
651 ok(sa != NULL, "Expected SafeArrayCreate to return a valid pointer\n");
652
653 V_VT(&var) = (VT_ARRAY | VT_UI1);
654 V_ARRAY(&var) = sa;
655
657 ok(hr == S_OK, "Expected SafeArrayLock to return S_OK, got 0x%08x\n", hr);
658
660 ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
661 ok(V_VT(&var) != (VT_ARRAY | VT_UI1), "Expected the variant to be modified\n");
662
664 ok(hr == S_OK, "Expected SafeArrayUnlock to return S_OK, got 0x%08x\n", hr);
666 ok(hr == S_OK, "Expected SafeArrayDestroy to return S_OK, got 0x%08x\n", hr);
667
668 /* Determine whether GetProp calls VariantClear on the passed variant. */
669 V_VT(&var) = VT_UNKNOWN;
672
674 ok(hr == S_OK, "Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08x\n", hr);
675 ok(V_VT(&var) != VT_UNKNOWN, "Expected the variant to be modified\n");
676
679 ok(ref == 2, "Expected reference count to be 2, got %u\n", ref);
681
683cleanup:
686}
687
688static void test_root_children(void)
689{
690 static const WCHAR DxDiag_DirectSound[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d',0};
691 static const WCHAR DxDiag_DirectMusic[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','M','u','s','i','c',0};
692 static const WCHAR DxDiag_DirectInput[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','I','n','p','u','t',0};
693 static const WCHAR DxDiag_DirectPlay[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','P','l','a','y',0};
694 static const WCHAR DxDiag_SystemDevices[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','D','e','v','i','c','e','s',0};
695 static const WCHAR DxDiag_DirectXFiles[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','X','F','i','l','e','s',0};
696 static const WCHAR DxDiag_DirectShowFilters[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','h','o','w','F','i','l','t','e','r','s',0};
697 static const WCHAR DxDiag_LogicalDisks[] = {'D','x','D','i','a','g','_','L','o','g','i','c','a','l','D','i','s','k','s',0};
698
699 HRESULT hr;
701
702 static const WCHAR *root_children[] = {
703 DxDiag_SystemInfo, DxDiag_DisplayDevices, DxDiag_DirectSound,
704 DxDiag_DirectMusic, DxDiag_DirectInput, DxDiag_DirectPlay,
705 DxDiag_SystemDevices, DxDiag_DirectXFiles, DxDiag_DirectShowFilters,
706 DxDiag_LogicalDisks
707 };
708
710 {
711 skip("Unable to create the root IDxDiagContainer\n");
712 return;
713 }
714
715 /* Verify the identity and ordering of the root container's children. */
717 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
718 if (FAILED(hr))
719 {
720 skip("IDxDiagContainer::GetNumberOfChildContainers failed\n");
721 goto cleanup;
722 }
723
724 ok(count == ARRAY_SIZE(root_children),
725 "Got unexpected count %u for the number of child containers\n", count);
726
727 if (count != ARRAY_SIZE(root_children))
728 {
729 skip("Received unexpected number of child containers\n");
730 goto cleanup;
731 }
732
733 for (index = 0; index <= count; index++)
734 {
735 WCHAR container[256];
736
738 if (hr == E_INVALIDARG)
739 {
740 ok(index == count,
741 "Expected IDxDiagContainer::EnumChildContainerNames to return "
742 "E_INVALIDARG on the last index %u\n", count);
743 break;
744 }
745 else if (hr == S_OK)
746 {
747 ok(!lstrcmpW(container, root_children[index]),
748 "Expected container %s for index %u, got %s\n",
749 wine_dbgstr_w(root_children[index]), index, wine_dbgstr_w(container));
750 }
751 else
752 {
753 ok(0, "IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08x\n", hr);
754 break;
755 }
756 }
757
758cleanup:
761}
762
763static void test_container_properties(IDxDiagContainer *container, const struct property_test *property_tests, size_t len)
764{
765 HRESULT hr;
766
767 /* Check that the container has no properties if there are no properties to examine. */
768 if (len == 0)
769 {
770 DWORD prop_count;
771
773 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
774 if (hr == S_OK)
775 ok(prop_count == 0, "Expected container property count to be zero, got %u\n", prop_count);
776 }
777 else
778 {
779 VARIANT var;
780 int i;
781
783
784 /* Examine the variant types of obtained property values. */
785 for (i = 0; i < len; i++)
786 {
787 hr = IDxDiagContainer_GetProp(container, property_tests[i].prop, &var);
788 ok(hr == S_OK, "[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08x\n",
789 i, wine_dbgstr_w(property_tests[i].prop), hr);
790
791 if (hr == S_OK)
792 {
793 ok(V_VT(&var) == property_tests[i].vt,
794 "[%d] Expected variant type %d, got %d\n", i, property_tests[i].vt, V_VT(&var));
795 trace("%s = %s\n", wine_dbgstr_w(property_tests[i].prop), debugstr_variant(&var));
797 }
798 }
799 }
800}
801
802static void test_DxDiag_SystemInfo(void)
803{
804 static const WCHAR dwOSMajorVersion[] = {'d','w','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0};
805 static const WCHAR dwOSMinorVersion[] = {'d','w','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0};
806 static const WCHAR dwOSBuildNumber[] = {'d','w','O','S','B','u','i','l','d','N','u','m','b','e','r',0};
807 static const WCHAR dwOSPlatformID[] = {'d','w','O','S','P','l','a','t','f','o','r','m','I','D',0};
808 static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0};
809 static const WCHAR dwDirectXVersionMinor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','i','n','o','r',0};
810 static const WCHAR szDirectXVersionLetter[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','e','t','t','e','r',0};
811 static const WCHAR bDebug[] = {'b','D','e','b','u','g',0};
812 static const WCHAR bNECPC98[] = {'b','N','E','C','P','C','9','8',0};
813 static const WCHAR ullPhysicalMemory[] = {'u','l','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
814 static const WCHAR ullUsedPageFile[] = {'u','l','l','U','s','e','d','P','a','g','e','F','i','l','e',0};
815 static const WCHAR ullAvailPageFile[] = {'u','l','l','A','v','a','i','l','P','a','g','e','F','i','l','e',0};
816 static const WCHAR szWindowsDir[] = {'s','z','W','i','n','d','o','w','s','D','i','r',0};
817 static const WCHAR szCSDVersion[] = {'s','z','C','S','D','V','e','r','s','i','o','n',0};
818 static const WCHAR szDirectXVersionEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0};
819 static const WCHAR szDirectXVersionLongEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','o','n','g','E','n','g','l','i','s','h',0};
820 static const WCHAR bNetMeetingRunning[] = {'b','N','e','t','M','e','e','t','i','n','g','R','u','n','n','i','n','g',0};
821 static const WCHAR szMachineNameLocalized[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','L','o','c','a','l','i','z','e','d',0};
822 static const WCHAR szMachineNameEnglish[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','E','n','g','l','i','s','h',0};
823 static const WCHAR szLanguagesLocalized[] = {'s','z','L','a','n','g','u','a','g','e','s','L','o','c','a','l','i','z','e','d',0};
824 static const WCHAR szLanguagesEnglish[] = {'s','z','L','a','n','g','u','a','g','e','s','E','n','g','l','i','s','h',0};
825 static const WCHAR szTimeLocalized[] = {'s','z','T','i','m','e','L','o','c','a','l','i','z','e','d',0};
826 static const WCHAR szTimeEnglish[] = {'s','z','T','i','m','e','E','n','g','l','i','s','h',0};
827 static const WCHAR szPhysicalMemoryEnglish[] = {'s','z','P','h','y','s','i','c','a','l','M','e','m','o','r','y','E','n','g','l','i','s','h',0};
828 static const WCHAR szPageFileLocalized[] = {'s','z','P','a','g','e','F','i','l','e','L','o','c','a','l','i','z','e','d',0};
829 static const WCHAR szPageFileEnglish[] = {'s','z','P','a','g','e','F','i','l','e','E','n','g','l','i','s','h',0};
830 static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0};
831 static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0};
832 static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0};
833 static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0};
834 static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0};
835 static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0};
836 static const WCHAR szProcessorEnglish[] = {'s','z','P','r','o','c','e','s','s','o','r','E','n','g','l','i','s','h',0};
837
838 static const struct property_test property_tests[] =
839 {
840 {dwOSMajorVersion, VT_UI4},
841 {dwOSMinorVersion, VT_UI4},
842 {dwOSBuildNumber, VT_UI4},
843 {dwOSPlatformID, VT_UI4},
844 {dwDirectXVersionMajor, VT_UI4},
845 {dwDirectXVersionMinor, VT_UI4},
846 {szDirectXVersionLetter, VT_BSTR},
847 {bDebug, VT_BOOL},
848 {bNECPC98, VT_BOOL},
849 {ullPhysicalMemory, VT_BSTR},
850 {ullUsedPageFile, VT_BSTR},
851 {ullAvailPageFile, VT_BSTR},
852 {szWindowsDir, VT_BSTR},
853 {szCSDVersion, VT_BSTR},
854 {szDirectXVersionEnglish, VT_BSTR},
855 {szDirectXVersionLongEnglish, VT_BSTR},
856 {bNetMeetingRunning, VT_BOOL},
857 {szMachineNameLocalized, VT_BSTR},
858 {szMachineNameEnglish, VT_BSTR},
859 {szLanguagesLocalized, VT_BSTR},
860 {szLanguagesEnglish, VT_BSTR},
861 {szTimeLocalized, VT_BSTR},
862 {szTimeEnglish, VT_BSTR},
863 {szPhysicalMemoryEnglish, VT_BSTR},
864 {szPageFileLocalized, VT_BSTR},
865 {szPageFileEnglish, VT_BSTR},
866 {szOSLocalized, VT_BSTR},
867 {szOSExLocalized, VT_BSTR},
868 {szOSExLongLocalized, VT_BSTR},
869 {szOSEnglish, VT_BSTR},
870 {szOSExEnglish, VT_BSTR},
871 {szOSExLongEnglish, VT_BSTR},
872 {szProcessorEnglish, VT_BSTR},
873 };
874
875 IDxDiagContainer *container, *container2;
876 static const WCHAR empty[] = {0};
877 HRESULT hr;
878
880 {
881 skip("Unable to create the root IDxDiagContainer\n");
882 return;
883 }
884
886 ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr);
887
889 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
890
891 if (hr == S_OK)
892 {
893 trace("Testing container DxDiag_SystemInfo\n");
894 test_container_properties(container, property_tests, ARRAY_SIZE(property_tests));
895
896 container2 = NULL;
898 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
899 ok(container2 != NULL, "Expected container2 != NULL\n");
900 ok(container2 != container, "Expected container != container2\n");
901 if (hr == S_OK) IDxDiagContainer_Release(container2);
902
904 }
905
908}
909
911{
912 static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
913 static const WCHAR szDeviceName[] = {'s','z','D','e','v','i','c','e','N','a','m','e',0};
914 static const WCHAR szKeyDeviceID[] = {'s','z','K','e','y','D','e','v','i','c','e','I','D',0};
915 static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0};
916 static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0};
917 static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0};
918 static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0};
919 static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0};
920 static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0};
921 static const WCHAR dwBpp[] = {'d','w','B','p','p',0};
922 static const WCHAR szDisplayMemoryLocalized[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','L','o','c','a','l','i','z','e','d',0};
923 static const WCHAR szDisplayMemoryEnglish[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','E','n','g','l','i','s','h',0};
924 static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0};
925 static const WCHAR szDriverVersion[] = {'s','z','D','r','i','v','e','r','V','e','r','s','i','o','n',0};
926 static const WCHAR szSubSysId[] = {'s','z','S','u','b','S','y','s','I','d',0};
927 static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0};
928 static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0};
929 static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0};
930 static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0};
931 static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
932 static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0};
933 static const WCHAR iAdapter[] = {'i','A','d','a','p','t','e','r',0};
934
935 static const struct property_test property_tests[] =
936 {
944 {dwWidth, VT_UI4},
945 {dwHeight, VT_UI4},
946 {dwBpp, VT_UI4},
955 {b3DAccelerationExists, VT_BOOL},
956 {b3DAccelerationEnabled, VT_BOOL},
957 {bDDAccelerationEnabled, VT_BOOL},
958 {iAdapter, VT_UI4},
959 };
960
961 IDxDiagContainer *display_cont = NULL;
962 DWORD count, i;
963 HRESULT hr;
964
966 {
967 skip("Unable to create the root IDxDiagContainer\n");
968 return;
969 }
970
972 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
973
974 if (hr != S_OK)
975 goto cleanup;
976
978 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
979 if (hr == S_OK)
980 ok(count == 0, "Expected count to be 0, got %u\n", count);
981
983 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
984
985 if (hr != S_OK)
986 goto cleanup;
987
988 for (i = 0; i < count; i++)
989 {
990 WCHAR child_container[256];
991 IDxDiagContainer *child;
992
993 hr = IDxDiagContainer_EnumChildContainerNames(display_cont, i, child_container, ARRAY_SIZE(child_container));
994 ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
995
996 hr = IDxDiagContainer_GetChildContainer(display_cont, child_container, &child);
997 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
998
999 if (hr == S_OK)
1000 {
1001 trace("Testing container %s\n", wine_dbgstr_w(child_container));
1002 test_container_properties(child, property_tests, ARRAY_SIZE(property_tests));
1003 }
1005 }
1006
1007cleanup:
1008 if (display_cont) IDxDiagContainer_Release(display_cont);
1011}
1012
1014{
1015 static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
1016 static const WCHAR szGuidDeviceID[] = {'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0};
1017 static const WCHAR szDriverPath[] = {'s','z','D','r','i','v','e','r','P','a','t','h',0};
1018 static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0};
1019 static const WCHAR empty[] = {0};
1020
1021 static const struct property_test property_tests[] =
1022 {
1024 {szGuidDeviceID, VT_BSTR},
1026 {szDriverPath, VT_BSTR},
1027 };
1028
1029 IDxDiagContainer *sound_cont = NULL;
1030 DWORD count, i;
1031 HRESULT hr;
1032
1034 {
1035 skip("Unable to create the root IDxDiagContainer\n");
1036 return;
1037 }
1038
1040 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
1041
1042 if (hr != S_OK)
1043 goto cleanup;
1044
1046 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
1047 if (hr == S_OK)
1048 ok(count == 0, "Expected count to be 0, got %u\n", count);
1049
1051 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
1052
1053 if (hr != S_OK)
1054 goto cleanup;
1055
1056 for (i = 0; i < count; i++)
1057 {
1058 WCHAR child_container[256];
1059 IDxDiagContainer *child, *child2;
1060
1061 hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR));
1062 ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
1063
1064 hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child);
1065 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
1066
1067 if (hr == S_OK)
1068 {
1069 trace("Testing container %s\n", wine_dbgstr_w(child_container));
1070 test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0]));
1071 }
1072
1073 child2 = NULL;
1075 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
1076 ok(child2 != NULL, "Expected child2 != NULL\n");
1077 ok(child2 != child, "Expected child != child2\n");
1078 if (hr == S_OK) IDxDiagContainer_Release(child2);
1079
1081 }
1082
1083cleanup:
1084 if (sound_cont) IDxDiagContainer_Release(sound_cont);
1087}
1088
1090{
1091 static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0};
1092 static const WCHAR szGuidDeviceID[] = {'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0};
1093 static const WCHAR szDriverPath[] = {'s','z','D','r','i','v','e','r','P','a','t','h',0};
1094 static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0};
1095
1096 static const struct property_test property_tests[] =
1097 {
1099 {szGuidDeviceID, VT_BSTR},
1101 {szDriverPath, VT_BSTR},
1102 };
1103
1104 IDxDiagContainer *sound_cont = NULL;
1105 DWORD count, i;
1106 HRESULT hr;
1107
1109 {
1110 skip("Unable to create the root IDxDiagContainer\n");
1111 return;
1112 }
1113
1115 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
1116
1117 if (hr != S_OK)
1118 goto cleanup;
1119
1121 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08x\n", hr);
1122 if (hr == S_OK)
1123 ok(count == 0, "Expected count to be 0, got %u\n", count);
1124
1126 ok(hr == S_OK, "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08x\n", hr);
1127
1128 if (hr != S_OK)
1129 goto cleanup;
1130
1131 for (i = 0; i < count; i++)
1132 {
1133 WCHAR child_container[256];
1134 IDxDiagContainer *child;
1135
1136 hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR));
1137 ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr);
1138
1139 hr = IDxDiagContainer_GetChildContainer(sound_cont, child_container, &child);
1140 ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr);
1141
1142 if (hr == S_OK)
1143 {
1144 trace("Testing container %s\n", wine_dbgstr_w(child_container));
1145 test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0]));
1146 }
1148 }
1149
1150cleanup:
1151 if (sound_cont) IDxDiagContainer_Release(sound_cont);
1154}
1155
1157{
1165 test_GetProp();
1166
1173}
#define expect(EXPECTED, GOT)
Definition: SystemMenu.c:483
static struct sockaddr_in sa
Definition: adnsresfilter.c:69
#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 index(s, c)
Definition: various.h:29
#define ARRAY_SIZE(A)
Definition: main.h:20
BOOL bDebug
Definition: service.c:37
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT hr
Definition: delayimp.cpp:573
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR dwBpp[]
Definition: provider.c:64
static const WCHAR szDisplayMemoryLocalized[]
Definition: provider.c:65
static const WCHAR dwWidth[]
Definition: provider.c:62
static const WCHAR szKeyDeviceID[]
Definition: provider.c:57
static const WCHAR szRevisionId[]
Definition: provider.c:72
static const WCHAR dwHeight[]
Definition: provider.c:63
static const WCHAR dwRefreshRate[]
Definition: provider.c:73
static const WCHAR szDisplayMemoryEnglish[]
Definition: provider.c:66
static const WCHAR szSubSysId[]
Definition: provider.c:71
static const WCHAR szDriverVersion[]
Definition: provider.c:70
static const WCHAR szKeyDeviceKey[]
Definition: provider.c:58
static const WCHAR szVendorId[]
Definition: provider.c:59
static const WCHAR szDeviceName[]
Definition: provider.c:56
static const WCHAR szManufacturer[]
Definition: provider.c:74
static const WCHAR szDescription[]
Definition: provider.c:55
static const WCHAR szDeviceId[]
Definition: provider.c:60
static const WCHAR iAdapter[]
Definition: provider.c:100
static const WCHAR szDeviceIdentifier[]
Definition: provider.c:61
static const WCHAR szDriverName[]
Definition: provider.c:69
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
static const WCHAR empty[1]
Definition: string.c:47
#define CP_ACP
Definition: compat.h:109
unsigned short VARTYPE
Definition: compat.h:2254
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
@ VT_BSTR
Definition: compat.h:2303
@ VT_UNKNOWN
Definition: compat.h:2308
@ VT_ARRAY
Definition: compat.h:2341
@ VT_BOOL
Definition: compat.h:2306
@ VT_UI4
Definition: compat.h:2313
@ VT_EMPTY
Definition: compat.h:2295
@ VT_UI1
Definition: compat.h:2311
static void cleanup(void)
Definition: main.c:1335
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
Definition: suminfo.c:91
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2802
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
HRESULT WINAPI SafeArrayUnlock(SAFEARRAY *psa)
Definition: safearray.c:831
HRESULT WINAPI SafeArrayLock(SAFEARRAY *psa)
Definition: safearray.c:795
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1347
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
static const char * debugstr_variant(const VARIANT *var)
Definition: dom.c:505
#define IDxDiagContainer_Release(p)
Definition: dxdiag.h:66
#define IDxDiagProvider_Release(p)
Definition: dxdiag.h:61
#define IDxDiagContainer_GetProp(p, a, b)
Definition: dxdiag.h:72
#define IDxDiagContainer_GetChildContainer(p, a, b)
Definition: dxdiag.h:69
#define IDxDiagContainer_GetNumberOfProps(p, a)
Definition: dxdiag.h:70
#define IDxDiagContainer_AddRef(p)
Definition: dxdiag.h:65
#define IDxDiagProvider_GetRootContainer(p, a)
Definition: dxdiag.h:63
#define DXDIAG_DX9_SDK_VERSION
Definition: dxdiag.h:6
#define IDxDiagContainer_GetNumberOfChildContainers(p, a)
Definition: dxdiag.h:67
#define IDxDiagProvider_Initialize(p, a, b)
Definition: dxdiag.h:62
#define DXDIAG_E_INSUFFICIENT_BUFFER
Definition: dxdiag.h:57
#define IDxDiagContainer_EnumChildContainerNames(p, a, b, c)
Definition: dxdiag.h:68
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 index
Definition: glext.h:6031
GLenum const GLfloat * params
Definition: glext.h:5645
GLenum GLsizei len
Definition: glext.h:6722
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
static const WCHAR emptyW[]
Definition: navigate.c:40
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
static const WCHAR testW[]
Definition: jsregexp.c:44
#define wine_dbgstr_w
Definition: kernel32.h:34
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
#define sprintf
Definition: sprintf.c:45
const char * var
Definition: shader.c:5666
static const WCHAR DxDiag_SystemInfo[]
Definition: container.c:37
static void test_DxDiag_SoundDevices(void)
Definition: container.c:1013
static void test_DxDiag_SystemInfo(void)
Definition: container.c:802
static void test_dot_parsing(void)
Definition: container.c:308
static void test_root_children(void)
Definition: container.c:688
static const WCHAR DxDiag_SoundDevices[]
Definition: container.c:39
static const WCHAR DxDiag_DisplayDevices[]
Definition: container.c:38
static const WCHAR DxDiag_SoundCaptureDevices[]
Definition: container.c:41
static void test_GetChildContainer(void)
Definition: container.c:238
static void test_container_properties(IDxDiagContainer *container, const struct property_test *property_tests, size_t len)
Definition: container.c:763
static void test_GetProp(void)
Definition: container.c:545
static IDxDiagContainer * pddc
Definition: container.c:35
static void test_GetNumberOfChildContainers(void)
Definition: container.c:70
static IDxDiagProvider * pddp
Definition: container.c:34
static void test_EnumChildContainerNames(void)
Definition: container.c:118
static void test_DxDiag_SoundCaptureDevices(void)
Definition: container.c:1089
static BOOL create_root_IDxDiagContainer(void)
Definition: container.c:45
static void test_GetNumberOfProps(void)
Definition: container.c:95
static void test_DxDiag_DisplayDevices(void)
Definition: container.c:910
static void test_EnumPropNames(void)
Definition: container.c:405
static HWND child
Definition: cursoricon.c:298
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_VT(A)
Definition: oleauto.h:211
static calc_node_t temp
Definition: rpn_ieee.c:38
Definition: format.c:58
const WCHAR * prop
Definition: container.c:30
VARTYPE vt
Definition: container.c:31
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define IDxDiagContainer_EnumPropNames(p, a, b, c)
Definition: dxdiag.h:101
__wchar_t WCHAR
Definition: xmlstorage.h:180