https://git.reactos.org/?p=reactos.git;a=commitdiff;h=afc3201b402089c5bce59…
commit afc3201b402089c5bce59c8cc934c3e40eea41c2
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Thu Mar 8 13:40:32 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Thu Mar 8 13:40:32 2018 +0100
[DXDIAGN] Sync with Wine Staging 3.3. CORE-14434
---
dll/directx/wine/dxdiagn/CMakeLists.txt | 4 +-
dll/directx/wine/dxdiagn/container.c | 19 +-
dll/directx/wine/dxdiagn/dxdiag_main.c | 15 +-
dll/directx/wine/dxdiagn/dxdiag_private.h | 25 +--
dll/directx/wine/dxdiagn/dxdiagn.rc | 6 +-
dll/directx/wine/dxdiagn/precomp.h | 20 +++
dll/directx/wine/dxdiagn/provider.c | 280 +++++++++++++++++++++++++++++-
dll/directx/wine/dxdiagn/resource.h | 2 +
media/doc/README.WINE | 2 +-
9 files changed, 335 insertions(+), 38 deletions(-)
diff --git a/dll/directx/wine/dxdiagn/CMakeLists.txt
b/dll/directx/wine/dxdiagn/CMakeLists.txt
index b857773887..7e16a5a07a 100644
--- a/dll/directx/wine/dxdiagn/CMakeLists.txt
+++ b/dll/directx/wine/dxdiagn/CMakeLists.txt
@@ -8,7 +8,7 @@ list(APPEND SOURCE
container.c
dxdiag_main.c
provider.c
- dxdiag_private.h)
+ precomp.h)
add_library(dxdiagn SHARED
${SOURCE}
@@ -20,5 +20,5 @@ set_module_type(dxdiagn win32dll)
target_link_libraries(dxdiagn strmiids dxguid uuid wine)
add_dependencies(dxdiagn dxdiagn_idlheader)
add_importlibs(dxdiagn d3d9 ddraw version ole32 oleaut32 psapi user32 dsound msvcrt
kernel32 ntdll)
-add_pch(dxdiagn dxdiag_private.h SOURCE)
+add_pch(dxdiagn precomp.h SOURCE)
add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all)
diff --git a/dll/directx/wine/dxdiagn/container.c b/dll/directx/wine/dxdiagn/container.c
index dd587c382b..6e068e572d 100644
--- a/dll/directx/wine/dxdiagn/container.c
+++ b/dll/directx/wine/dxdiagn/container.c
@@ -19,7 +19,14 @@
*
*/
+#include "config.h"
+
+#define COBJMACROS
#include "dxdiag_private.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
static inline IDxDiagContainerImpl *impl_from_IDxDiagContainer(IDxDiagContainer *iface)
{
@@ -155,6 +162,14 @@ static HRESULT WINAPI
IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
if (NULL == tmp) return E_FAIL;
lstrcpynW(tmp, pwszContainer, tmp_len);
+ /* special handling for an empty string and leaf container */
+ if (!tmp[0] && list_empty(&pContainer->subContainers)) {
+ hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, pContainer,
This->pProv, (void **)ppInstance);
+ if (SUCCEEDED(hr))
+ TRACE("Succeeded in getting the container instance\n");
+ goto out;
+ }
+
cur = strchrW(tmp, '.');
while (NULL != cur) {
*cur = '\0'; /* cut tmp string to '.' */
@@ -162,7 +177,7 @@ static HRESULT WINAPI
IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
TRACE("Trying to get parent container %s\n", debugstr_w(tmp));
hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp,
&pContainer);
if (FAILED(hr))
- goto on_error;
+ goto out;
cur++; /* go after '.' (just replaced by \0) */
tmp = cur;
cur = strchrW(tmp, '.');
@@ -176,7 +191,7 @@ static HRESULT WINAPI
IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i
TRACE("Succeeded in getting the container instance\n");
}
-on_error:
+out:
HeapFree(GetProcessHeap(), 0, orig_tmp);
return hr;
}
diff --git a/dll/directx/wine/dxdiagn/dxdiag_main.c
b/dll/directx/wine/dxdiagn/dxdiag_main.c
index 79bc45a8d4..e034b4e595 100644
--- a/dll/directx/wine/dxdiagn/dxdiag_main.c
+++ b/dll/directx/wine/dxdiagn/dxdiag_main.c
@@ -19,9 +19,22 @@
*
*/
+#define COBJMACROS
+
+#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "oleauto.h"
+#include "oleidl.h"
+#include "rpcproxy.h"
+#include "initguid.h"
#include "dxdiag_private.h"
+#include "wine/debug.h"
-#include <rpcproxy.h>
+WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
HINSTANCE dxdiagn_instance = 0;
diff --git a/dll/directx/wine/dxdiagn/dxdiag_private.h
b/dll/directx/wine/dxdiagn/dxdiag_private.h
index c17505a2f8..7c32a8518a 100644
--- a/dll/directx/wine/dxdiagn/dxdiag_private.h
+++ b/dll/directx/wine/dxdiagn/dxdiag_private.h
@@ -21,31 +21,16 @@
#ifndef __WINE_DXDIAG_PRIVATE_H
#define __WINE_DXDIAG_PRIVATE_H
-#include <wine/config.h>
-
#include <stdarg.h>
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-
-#include <wine/debug.h>
-#include <wine/dxdiag.h>
-#include <wine/list.h>
-#include <wine/unicode.h>
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "wine/list.h"
+#include "dxdiag.h"
#include "resource.h"
-WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
-
/* DXDiag Interfaces: */
typedef struct IDxDiagProviderImpl IDxDiagProviderImpl;
typedef struct IDxDiagContainerImpl IDxDiagContainerImpl;
diff --git a/dll/directx/wine/dxdiagn/dxdiagn.rc b/dll/directx/wine/dxdiagn/dxdiagn.rc
index 61e1e05d5f..68e387fbba 100644
--- a/dll/directx/wine/dxdiagn/dxdiagn.rc
+++ b/dll/directx/wine/dxdiagn/dxdiagn.rc
@@ -16,10 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <windef.h>
-
#include "resource.h"
+#pragma makedep po
+
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
@@ -37,6 +37,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_PRODUCTVERSION 5,3,1,904
#define WINE_PRODUCTVERSION_STR "5.3.1.904"
-#include <wine/wine_common_ver.rc>
+#include "wine/wine_common_ver.rc"
1 WINE_REGISTRY dxdiagn.rgs
diff --git a/dll/directx/wine/dxdiagn/precomp.h b/dll/directx/wine/dxdiagn/precomp.h
new file mode 100644
index 0000000000..dcc9acb99c
--- /dev/null
+++ b/dll/directx/wine/dxdiagn/precomp.h
@@ -0,0 +1,20 @@
+
+#ifndef __WINE_DXDIAG_PRECOMP_H
+#define __WINE_DXDIAG_PRECOMP_H
+
+#include <wine/config.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+
+#include "dxdiag_private.h"
+
+#include <wine/debug.h>
+#include <wine/unicode.h>
+
+#endif /* !__WINE_DXDIAG_PRECOMP_H */
diff --git a/dll/directx/wine/dxdiagn/provider.c b/dll/directx/wine/dxdiagn/provider.c
index 638dc23ccb..f0498532f5 100644
--- a/dll/directx/wine/dxdiagn/provider.c
+++ b/dll/directx/wine/dxdiagn/provider.c
@@ -20,16 +20,29 @@
*
*/
-#include "dxdiag_private.h"
+#include "config.h"
-#include <winver.h>
-#include <uuids.h>
-#include <mmddk.h>
-#include <d3d9.h>
-#include <fil_data.h>
-#include <psapi.h>
-#include <wbemcli.h>
-#include <dsound.h>
+#define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+#include "dxdiag_private.h"
+#include "wine/unicode.h"
+#include "winver.h"
+#include "objidl.h"
+#include "uuids.h"
+#include "vfw.h"
+#include "mmddk.h"
+#include "d3d9.h"
+#include "strmif.h"
+#include "initguid.h"
+#include "fil_data.h"
+#include "psapi.h"
+#include "wbemcli.h"
+#include "dsound.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
static const WCHAR szEmpty[] = {0};
@@ -48,6 +61,8 @@ static const WCHAR dwHeight[] =
{'d','w','H','e','i','g','h','t',0};
static const WCHAR dwBpp[] =
{'d','w','B','p','p',0};
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};
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};
+static const WCHAR szDisplayModeLocalized[] =
{'s','z','D','i','s','p','l','a','y','M','o','d','e','L','o','c','a','l','i','z','e','d',0};
+static const WCHAR szDisplayModeEnglish[] =
{'s','z','D','i','s','p','l','a','y','M','o','d','e','E','n','g','l','i','s','h',0};
static const WCHAR szDriverName[] =
{'s','z','D','r','i','v','e','r','N','a','m','e',0};
static const WCHAR szDriverVersion[] =
{'s','z','D','r','i','v','e','r','V','e','r','s','i','o','n',0};
static const WCHAR szSubSysId[] =
{'s','z','S','u','b','S','y','s','I','d',0};
@@ -57,6 +72,30 @@ static const WCHAR szManufacturer[] =
{'s','z','M','a','n','u','f','a','c','t','
static const WCHAR szChipType[] =
{'s','z','C','h','i','p','T','y','p','e',0};
static const WCHAR szDACType[] =
{'s','z','D','A','C','T','y','p','e',0};
static const WCHAR szRevision[] =
{'s','z','R','e','v','i','s','i','o','n',0};
+static const WCHAR szMonitorName[] =
{'s','z','M','o','n','i','t','o','r','N','a','m','e',0};
+static const WCHAR szMonitorMaxRes[] =
{'s','z','M','o','n','i','t','o','r','M','a','x','R','e','s',0};
+static const WCHAR szDriverAttributes[] =
{'s','z','D','r','i','v','e','r','A','t','t','r','i','b','u','t','e','s',0};
+static const WCHAR szDriverLanguageEnglish[] =
{'s','z','D','r','i','v','e','r','L','a','n','g','u','a','g','e','E','n','g','l','i','s','h',0};
+static const WCHAR szDriverLanguageLocalized[] =
{'s','z','D','r','i','v','e','r','L','a','n','g','u','a','g','e','L','o','c','a','l','i','z','e','d',0};
+static const WCHAR szDriverDateEnglish[] =
{'s','z','D','r','i','v','e','r','D','a','t','e','E','n','g','l','i','s','h',0};
+static const WCHAR szDriverDateLocalized[] =
{'s','z','D','r','i','v','e','r','D','a','t','e','L','o','c','a','l','i','z','e','d',0};
+static const WCHAR lDriverSize[] =
{'l','D','r','i','v','e','r','S','i','z','e',0};
+static const WCHAR szMiniVdd[] =
{'s','z','M','i','n','i','V','d','d',0};
+static const WCHAR szMiniVddDateLocalized[] =
{'s','z','M','i','n','i','V','d','d','D','a','t','e','L','o','c','a','l','i','z','e','d',0};
+static const WCHAR szMiniVddDateEnglish[] =
{'s','z','M','i','n','i','V','d','d','D','a','t','e','E','n','g','l','i','s','h',0};
+static const WCHAR lMiniVddSize[] =
{'l','M','i','n','i','V','d','d','S','i','z','e',0};
+static const WCHAR szVdd[] =
{'s','z','V','d','d',0};
+static const WCHAR bCanRenderWindow[] =
{'b','C','a','n','R','e','n','d','e','r','W','i','n','d','o','w',0};
+static const WCHAR bDriverBeta[] =
{'b','D','r','i','v','e','r','B','e','t','a',0};
+static const WCHAR bDriverDebug[] =
{'b','D','r','i','v','e','r','D','e','b','u','g',0};
+static const WCHAR bDriverSigned[] =
{'b','D','r','i','v','e','r','S','i','g','n','e','d',0};
+static const WCHAR bDriverSignedValid[] =
{'b','D','r','i','v','e','r','S','i','g','n','e','d','V','a','l','i','d',0};
+static const WCHAR szDriverSignDate[] =
{'s','z','D','r','i','v','e','r','S','i','g','n','D','a','t','e',0};
+static const WCHAR dwDDIVersion[] =
{'d','w','D','D','I','V','e','r','s','i','o','n',0};
+static const WCHAR szDDIVersionEnglish[] =
{'s','z','D','D','I','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0};
+static const WCHAR szDDIVersionLocalized[] =
{'s','z','D','D','I','V','e','r','s','i','o','n','L','o','c','a','l','i','z','e','d',0};
+static const WCHAR iAdapter[] =
{'i','A','d','a','p','t','e','r',0};
+static const WCHAR dwWHQLLevel[] =
{'d','w','W','H','Q','L','L','e','v','e','l',0};
struct IDxDiagProviderImpl
{
@@ -314,6 +353,23 @@ static inline HRESULT add_ui4_property(IDxDiagContainerImpl_Container
*node, con
return S_OK;
}
+static inline HRESULT add_i4_property(IDxDiagContainerImpl_Container *node, const WCHAR
*propName, LONG data)
+{
+ IDxDiagContainerImpl_Property *prop;
+
+ prop = allocate_property_information(propName);
+ if (!prop)
+ return E_OUTOFMEMORY;
+
+ V_VT(&prop->vProp) = VT_I4;
+ V_I4(&prop->vProp) = data;
+
+ list_add_tail(&node->properties, &prop->entry);
+ ++node->nProperties;
+
+ return S_OK;
+}
+
static inline HRESULT add_bool_property(IDxDiagContainerImpl_Container *node, const WCHAR
*propName, BOOL data)
{
IDxDiagContainerImpl_Property *prop;
@@ -913,6 +969,15 @@ static HRESULT
fill_display_information_d3d(IDxDiagContainerImpl_Container *node
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};
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};
static const WCHAR bNoHardware[] =
{'b','N','o','H','a','r','d','w','a','r','e',0};
+ static const WCHAR mode_fmtW[] = {'%','d','
','x',' ','%','d','
','(','%','d','
','b','i','t',')','
','(','%','d','H','z',')',0};
+ static const WCHAR gernericPNPMonitorW[] =
{'G','e','n','e','r','i','c','
','P','n','P','
','M','o','n','i','t','o','r',0};
+ static const WCHAR failedToGetParameterW[] =
{'F','a','i','l','e','d','
','t','o',' ','g','e','t','
','p','a','r','a','m','e','t','e','r',0};
+ static const WCHAR driverAttributesW[] =
{'F','i','n','a','l','
','R','e','t','a','i','l',0};
+ static const WCHAR englishW[] =
{'E','n','g','l','i','s','h',0};
+ static const WCHAR driverDateEnglishW[] =
{'1','/','1','/','2','0','1','6','
','1','0',':','0','0',':','0','0',0};
+ static const WCHAR driverDateLocalW[] =
{'1','/','1','/','2','0','1','6','
','1','0',':','0','0',':','0','0','
','A','M',0};
+ static const WCHAR naW[] = {'n','/','a',0};
+ static const WCHAR ddi11W[] = {'1','1',0};
D3DADAPTER_IDENTIFIER9 adapter_info;
D3DDISPLAYMODE adapter_mode;
@@ -1009,6 +1074,17 @@ static HRESULT
fill_display_information_d3d(IDxDiagContainerImpl_Container *node
hr = add_ui4_property(display_adapter, dwBpp,
depth_for_pixelformat(adapter_mode.Format));
if (FAILED(hr))
goto cleanup;
+
+ snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), mode_fmtW,
adapter_mode.Width, adapter_mode.Height,
+ depth_for_pixelformat(adapter_mode.Format),
adapter_mode.RefreshRate);
+
+ hr = add_bstr_property(display_adapter, szDisplayModeLocalized, buffer);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDisplayModeEnglish, buffer);
+ if (FAILED(hr))
+ goto cleanup;
}
hr = add_bstr_property(display_adapter, szKeyDeviceKey, szEmpty);
@@ -1062,6 +1138,102 @@ static HRESULT
fill_display_information_d3d(IDxDiagContainerImpl_Container *node
hr = add_bool_property(display_adapter, bNoHardware, FALSE);
if (FAILED(hr))
goto cleanup;
+
+ hr = add_bool_property(display_adapter, bCanRenderWindow, TRUE);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szMonitorName, gernericPNPMonitorW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szMonitorMaxRes, failedToGetParameterW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDriverAttributes, driverAttributesW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDriverLanguageEnglish, englishW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDriverLanguageLocalized, englishW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDriverDateEnglish,
driverDateEnglishW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDriverDateLocalized,
driverDateLocalW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_i4_property(display_adapter, lDriverSize, 10 * 1024 * 1024);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szMiniVdd, naW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szMiniVddDateLocalized, naW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szMiniVddDateEnglish, naW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_i4_property(display_adapter, lMiniVddSize, 0);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szVdd, naW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bool_property(display_adapter, bDriverBeta, FALSE);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bool_property(display_adapter, bDriverDebug, FALSE);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bool_property(display_adapter, bDriverSigned, TRUE);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bool_property(display_adapter, bDriverSignedValid, TRUE);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDriverSignDate, naW);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_ui4_property(display_adapter, dwDDIVersion, 11);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDDIVersionEnglish, ddi11W);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_bstr_property(display_adapter, szDDIVersionLocalized, ddi11W);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_ui4_property(display_adapter, iAdapter, index);
+ if (FAILED(hr))
+ goto cleanup;
+
+ hr = add_ui4_property(display_adapter, dwWHQLLevel, 0);
+ if (FAILED(hr))
+ goto cleanup;
}
hr = S_OK;
@@ -1183,11 +1355,85 @@ static HRESULT
build_displaydevices_tree(IDxDiagContainerImpl_Container *node)
return fill_display_information_fallback(node);
}
+struct enum_context
+{
+ IDxDiagContainerImpl_Container *cont;
+ HRESULT hr;
+ int index;
+};
+
+static const WCHAR szGUIDFmt[] =
+{
+
'%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%','0',
+
'2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2',
+
'x','%','0','2','x','%','0','2','x','%','0','2','x',0
+};
+
+static LPWSTR guid_to_string(LPWSTR lpwstr, REFGUID lpcguid)
+{
+ wsprintfW(lpwstr, szGUIDFmt, lpcguid->Data1, lpcguid->Data2,
+ lpcguid->Data3, lpcguid->Data4[0], lpcguid->Data4[1],
+ lpcguid->Data4[2], lpcguid->Data4[3], lpcguid->Data4[4],
+ lpcguid->Data4[5], lpcguid->Data4[6], lpcguid->Data4[7]);
+
+ return lpwstr;
+}
+
+BOOL CALLBACK dsound_enum(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID context)
+{
+ static const WCHAR deviceid_fmtW[] = {'%','u',0};
+ static const WCHAR szGuidDeviceID[] =
{'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0};
+ static const WCHAR szDriverPath[] =
{'s','z','D','r','i','v','e','r','P','a','t','h',0};
+
+ struct enum_context *enum_ctx = context;
+ IDxDiagContainerImpl_Container *device;
+ WCHAR buffer[256];
+ const WCHAR *p, *name;
+
+ /* the default device is enumerated twice, one time without GUID */
+ if (!guid) return TRUE;
+
+ snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), deviceid_fmtW, enum_ctx->index);
+ device = allocate_information_node(buffer);
+ if (!device)
+ {
+ enum_ctx->hr = E_OUTOFMEMORY;
+ return FALSE;
+ }
+
+ add_subcontainer(enum_ctx->cont, device);
+
+ guid_to_string(buffer, guid);
+ enum_ctx->hr = add_bstr_property(device, szGuidDeviceID, buffer);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ enum_ctx->hr = add_bstr_property(device, szDescription, desc);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ enum_ctx->hr = add_bstr_property(device, szDriverPath, module);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ name = module;
+ if ((p = strrchrW(name, '\\'))) name = p + 1;
+ if ((p = strrchrW(name, '/'))) name = p + 1;
+
+ enum_ctx->hr = add_bstr_property(device, szDriverName, name);
+ if (FAILED(enum_ctx->hr))
+ return FALSE;
+
+ enum_ctx->index++;
+ return TRUE;
+}
+
static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
{
static const WCHAR DxDiag_SoundDevices[] =
{'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0};
static const WCHAR DxDiag_SoundCaptureDevices[] =
{'D','x','D','i','a','g','_','S','o','u','n','d','C','a','p','t','u','r','e','D','e','v','i','c','e','s',0};
+ struct enum_context enum_ctx;
IDxDiagContainerImpl_Container *cont;
cont = allocate_information_node(DxDiag_SoundDevices);
@@ -1196,12 +1442,28 @@ static HRESULT
build_directsound_tree(IDxDiagContainerImpl_Container *node)
add_subcontainer(node, cont);
+ enum_ctx.cont = cont;
+ enum_ctx.hr = S_OK;
+ enum_ctx.index = 0;
+
+ DirectSoundEnumerateW(dsound_enum, &enum_ctx);
+ if (FAILED(enum_ctx.hr))
+ return enum_ctx.hr;
+
cont = allocate_information_node(DxDiag_SoundCaptureDevices);
if (!cont)
return E_OUTOFMEMORY;
add_subcontainer(node, cont);
+ enum_ctx.cont = cont;
+ enum_ctx.hr = S_OK;
+ enum_ctx.index = 0;
+
+ DirectSoundCaptureEnumerateW(dsound_enum, &enum_ctx);
+ if (FAILED(enum_ctx.hr))
+ return enum_ctx.hr;
+
return S_OK;
}
diff --git a/dll/directx/wine/dxdiagn/resource.h b/dll/directx/wine/dxdiagn/resource.h
index 2627a18a66..b2c63510be 100644
--- a/dll/directx/wine/dxdiagn/resource.h
+++ b/dll/directx/wine/dxdiagn/resource.h
@@ -20,5 +20,7 @@
#pragma once
+#include <windef.h>
+
#define IDS_REGIONAL_SETTING 1
#define IDS_PAGE_FILE_FORMAT 2
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index f03769bea8..111a877b04 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -36,7 +36,7 @@ reactos/dll/directx/wine/dmusic # Synced to WineStaging-3.3
reactos/dll/directx/wine/dplay # Synced to WineStaging-3.3
reactos/dll/directx/wine/dplayx # Synced to WineStaging-3.3
reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
-reactos/dll/directx/wine/dxdiagn # Synced to Wine-3.0
+reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-3.3
reactos/dll/directx/wine/msdmo # Synced to WineStaging-2.9
reactos/dll/directx/wine/qedit # Synced to Wine-3.0
reactos/dll/directx/wine/quartz # Synced to Wine-3.0