34static IDxDiagProvider *
pddp;
35static IDxDiagContainer *
pddc;
69 skip(
"Unable to create the root IDxDiagContainer\n");
75 "Expected IDxDiagContainer::GetNumberOfChildContainers to return E_INVALIDARG, got 0x%08lx\n",
hr);
79 "Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
81 ok(
count != 0,
"Expected the number of child containers for the root container to be non-zero\n");
94 skip(
"Unable to create the root IDxDiagContainer\n");
99 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetNumberOfProps to return E_INVALIDARG, got 0x%08lx\n",
hr);
102 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n",
hr);
104 ok(
count == 0,
"Expected the number of properties for the root container to be zero\n");
119 skip(
"Unable to create the root IDxDiagContainer\n");
126 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
130 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
136 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
143 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
150 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
155 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
158 skip(
"IDxDiagContainer::GetNumberOfChildContainers failed\n");
162 trace(
"Starting child container enumeration of the root container:\n");
170 DWORD buffersize = 1;
177 "Expected IDxDiagContainer::EnumChildContainerNames to return E_INVALIDARG "
178 "on the last index %ld, got 0x%08lx\n",
index,
hr);
193 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
200 for (buffersize = 2; buffersize <= 256; buffersize++)
212 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, "
213 "got hr = 0x%08lx, buffersize = %ld\n",
hr, buffersize);
219 ok(0,
"IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08lx\n",
hr);
233 IDxDiagContainer *
child;
237 skip(
"Unable to create the root IDxDiagContainer\n");
244 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n",
hr);
246 child = (
void*)0xdeadbeef;
249 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n",
hr);
250 ok(
child == (
void*)0xdeadbeef,
"Expected output pointer to be unchanged, got %p\n",
child);
254 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n",
hr);
256 child = (
void*)0xdeadbeef;
259 "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n",
hr);
265 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
268 skip(
"IDxDiagContainer::EnumChildContainerNames failed\n");
272 child = (
void*)0xdeadbeef;
275 "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
280 IDxDiagContainer *
ptr;
286 "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
288 ok(
ptr !=
child,
"Expected the two pointers (%p vs. %p) to be unequal\n",
child,
ptr);
302 WCHAR containerbufW[256] = {0}, childbufW[256] = {0};
320 skip(
"Unable to create the root IDxDiagContainer\n");
326 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
329 skip(
"IDxDiagContainer::GetNumberOfChildContainers failed\n");
335 IDxDiagContainer *
child;
338 ok(
hr ==
S_OK,
"Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
341 skip(
"IDxDiagContainer::EnumChildContainerNames failed\n");
346 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
352 "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK or E_INVALIDARG, got 0x%08lx\n",
hr);
360 if (!*containerbufW || !*childbufW)
362 skip(
"Unable to find a suitable container\n");
366 trace(
"Testing IDxDiagContainer::GetChildContainer dot parsing with container %s and child container %s.\n",
371 IDxDiagContainer *
child;
372 char containerbufA[256];
374 char dotbufferA[255 + 255 + 3 + 1];
375 WCHAR dotbufferW[255 + 255 + 3 + 1];
379 sprintf(dotbufferA, test_strings[
i].
format, containerbufA, childbufA);
385 "Expected IDxDiagContainer::GetChildContainer to return 0x%08lx for %s, got 0x%08lx\n",
406 skip(
"Unable to create the root IDxDiagContainer\n");
412 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
415 skip(
"IDxDiagContainer::GetNumberOfChildContainers failed\n");
422 ok(
hr ==
S_OK,
"Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
425 skip(
"IDxDiagContainer::EnumChildContainerNames failed\n");
430 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
435 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n",
hr);
449 skip(
"Unable to find a container with non-zero property count\n");
454 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
458 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
464 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG, got 0x%08lx\n",
hr);
476 DWORD buffersize = 1;
484 "Expected IDxDiagContainer::EnumPropNames to return E_INVALIDARG "
485 "on the last index %ld, got 0x%08lx\n",
index,
hr);
498 "Expected IDxDiagContainer::EnumPropNames to return S_OK, got 0x%08lx\n",
hr);
505 for (buffersize = 2; buffersize <= 256; buffersize++)
517 "Expected IDxDiagContainer::EnumPropNames to return S_OK, "
518 "got hr = 0x%08lx, buffersize = %ld\n",
hr, buffersize);
524 ok(0,
"IDxDiagContainer::EnumPropNames unexpectedly returned 0x%08lx\n",
hr);
550 skip(
"Unable to create the root IDxDiagContainer\n");
556 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
559 skip(
"IDxDiagContainer::GetNumberOfChildContainers failed\n");
566 ok(
hr ==
S_OK,
"Expected IDxDiagContainer_EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
569 skip(
"IDxDiagContainer::EnumChildContainerNames failed\n");
574 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
580 "Expected IDxDiagContainer::EnumPropNames to return S_OK or E_INVALIDARG, got 0x%08lx\n",
hr);
594 skip(
"Unable to find a suitable container\n");
599 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n",
hr);
603 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n",
hr);
604 ok(
V_VT(&
var) == 0xdead,
"Expected the variant to be untouched, got %u\n",
V_VT(&
var));
607 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n",
hr);
611 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n",
hr);
612 ok(
V_VT(&
var) == 0xdead,
"Expected the variant to be untouched, got %u\n",
V_VT(&
var));
615 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n",
hr);
619 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetProp to return E_INVALIDARG, got 0x%08lx\n",
hr);
620 ok(
V_VT(&
var) == 0xdead,
"Expected the variant to be untouched, got %u\n",
V_VT(&
var));
624 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n",
hr);
634 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n",
hr);
635 ok(
V_VT(&
var) != 0xdead,
"Expected the variant to be modified, got %d\n",
V_VT(&
var));
641 ok(
sa !=
NULL,
"Expected SafeArrayCreate to return a valid pointer\n");
647 ok(
hr ==
S_OK,
"Expected SafeArrayLock to return S_OK, got 0x%08lx\n",
hr);
650 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n",
hr);
654 ok(
hr ==
S_OK,
"Expected SafeArrayUnlock to return S_OK, got 0x%08lx\n",
hr);
656 ok(
hr ==
S_OK,
"Expected SafeArrayDestroy to return S_OK, got 0x%08lx\n",
hr);
664 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetProp to return S_OK, got 0x%08lx\n",
hr);
669 ok(
ref == 2,
"Expected reference count to be 2, got %lu\n",
ref);
683 static const WCHAR *root_children[] = {
684 L"DxDiag_SystemInfo",
L"DxDiag_DisplayDevices",
L"DxDiag_DirectSound",
685 L"DxDiag_DirectMusic",
L"DxDiag_DirectInput",
L"DxDiag_DirectPlay",
686 L"DxDiag_SystemDevices",
L"DxDiag_DirectXFiles",
L"DxDiag_DirectShowFilters",
687 L"DxDiag_LogicalDisks"
692 skip(
"Unable to create the root IDxDiagContainer\n");
698 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
701 skip(
"IDxDiagContainer::GetNumberOfChildContainers failed\n");
706 "Got unexpected count %lu for the number of child containers\n",
count);
710 skip(
"Received unexpected number of child containers\n");
722 "Expected IDxDiagContainer::EnumChildContainerNames to return "
723 "E_INVALIDARG on the last index %lu\n",
count);
729 "Expected container %s for index %lu, got %s\n",
734 ok(0,
"IDxDiagContainer::EnumChildContainerNames unexpectedly returned 0x%08lx\n",
hr);
754 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n",
hr);
756 ok(prop_count == 0,
"Expected container property count to be zero, got %lu\n", prop_count);
769 ok(
hr ==
S_OK,
"[%d] Expected IDxDiagContainer::GetProp to return S_OK for %s, got 0x%08lx\n",
775 "[%d] Expected variant type %d, got %d\n",
i, property_tests[
i].
vt,
V_VT(&
var));
791 {
L"dwDirectXVersionMajor",
VT_UI4},
792 {
L"dwDirectXVersionMinor",
VT_UI4},
793 {
L"szDirectXVersionLetter",
VT_BSTR},
802 {
L"szDirectXVersionEnglish",
VT_BSTR},
803 {
L"szDirectXVersionLongEnglish",
VT_BSTR},
805 {
L"szMachineNameLocalized",
VT_BSTR},
811 {
L"szPhysicalMemoryEnglish",
VT_BSTR},
823 IDxDiagContainer *
container, *container2;
828 skip(
"Unable to create the root IDxDiagContainer\n");
833 ok(
hr ==
E_INVALIDARG,
"Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08lx\n",
hr);
836 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
840 trace(
"Testing container DxDiag_SystemInfo\n");
845 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
846 ok(container2 !=
NULL,
"Expected container2 != NULL\n");
847 ok(container2 !=
container,
"Expected container != container2\n");
871 {
L"szDisplayMemoryLocalized",
VT_BSTR},
872 {
L"szDisplayMemoryEnglish",
VT_BSTR},
879 {
L"b3DAccelerationExists",
VT_BOOL},
880 {
L"b3DAccelerationEnabled",
VT_BOOL},
884 {
L"bDDAccelerationEnabled",
VT_BOOL},
888 IDxDiagContainer *display_cont =
NULL;
894 skip(
"Unable to create the root IDxDiagContainer\n");
899 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
905 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n",
hr);
907 ok(
count == 0,
"Expected count to be 0, got %lu\n",
count);
910 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
917 WCHAR child_container[256];
918 IDxDiagContainer *
child;
921 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
924 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
951 IDxDiagContainer *sound_cont =
NULL;
957 skip(
"Unable to create the root IDxDiagContainer\n");
962 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
965 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n",
hr);
966 ok(
count == 0,
"Expected count to be 0, got %lu\n",
count);
969 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
973 IDxDiagContainer *
child, *child2;
974 WCHAR child_container[256];
977 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
980 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
987 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
988 ok(child2 !=
NULL,
"Expected child2 != NULL\n");
989 ok(child2 !=
child,
"Expected child != child2\n");
1010 IDxDiagContainer *sound_cont =
NULL;
1016 skip(
"Unable to create the root IDxDiagContainer\n");
1021 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
1024 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfProps to return S_OK, got 0x%08lx\n",
hr);
1025 ok(
count == 0,
"Expected count to be 0, got %lu\n",
count);
1028 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetNumberOfChildContainers to return S_OK, got 0x%08lx\n",
hr);
1032 WCHAR child_container[256];
1033 IDxDiagContainer *
child;
1036 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08lx\n",
hr);
1039 ok(
hr ==
S_OK,
"Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08lx\n",
hr);
static struct sockaddr_in sa
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
#define WideCharToMultiByte
#define MultiByteToWideChar
static void cleanup(void)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
HRESULT WINAPI SafeArrayUnlock(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayLock(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
static const char * debugstr_variant(const VARIANT *var)
#define IDxDiagContainer_Release(p)
#define IDxDiagProvider_Release(p)
#define IDxDiagContainer_GetProp(p, a, b)
#define IDxDiagContainer_GetChildContainer(p, a, b)
#define IDxDiagContainer_GetNumberOfProps(p, a)
#define IDxDiagContainer_AddRef(p)
#define IDxDiagProvider_GetRootContainer(p, a)
#define DXDIAG_DX9_SDK_VERSION
#define IDxDiagContainer_GetNumberOfChildContainers(p, a)
#define IDxDiagProvider_Initialize(p, a, b)
#define DXDIAG_E_INSUFFICIENT_BUFFER
#define IDxDiagContainer_EnumChildContainerNames(p, a, b, c)
GLuint GLuint GLsizei count
GLenum const GLfloat * params
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
#define memcpy(s1, s2, n)
static void test_DxDiag_SoundDevices(void)
static void test_DxDiag_SystemInfo(void)
static void test_dot_parsing(void)
static void test_root_children(void)
static void test_GetChildContainer(void)
static void test_container_properties(IDxDiagContainer *container, const struct property_test *property_tests, size_t len)
static void test_GetProp(void)
static IDxDiagContainer * pddc
static void test_GetNumberOfChildContainers(void)
static IDxDiagProvider * pddp
static void test_EnumChildContainerNames(void)
static void test_DxDiag_SoundCaptureDevices(void)
static BOOL create_root_IDxDiagContainer(void)
static void test_GetNumberOfProps(void)
static void test_DxDiag_DisplayDevices(void)
static void test_EnumPropNames(void)
static const WCHAR testW[]
#define IDxDiagContainer_EnumPropNames(p, a, b, c)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)