Author: akhaldi
Date: Tue Nov 24 10:59:31 2015
New Revision: 70089
URL:
http://svn.reactos.org/svn/reactos?rev=70089&view=rev
Log:
[DXDIAGN] Sync with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt
trunk/reactos/dll/directx/wine/dxdiagn/container.c
trunk/reactos/dll/directx/wine/dxdiagn/fil_data.idl
trunk/reactos/dll/directx/wine/dxdiagn/provider.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxdiagn/C…
==============================================================================
--- trunk/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt [iso-8859-1] Tue Nov 24 10:59:31
2015
@@ -19,6 +19,6 @@
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 msvcrt kernel32
ntdll)
+add_importlibs(dxdiagn d3d9 ddraw version ole32 oleaut32 psapi user32 dsound msvcrt
kernel32 ntdll)
add_pch(dxdiagn dxdiag_private.h SOURCE)
add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/directx/wine/dxdiagn/container.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxdiagn/c…
==============================================================================
--- trunk/reactos/dll/directx/wine/dxdiagn/container.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dxdiagn/container.c [iso-8859-1] Tue Nov 24 10:59:31
2015
@@ -154,6 +154,14 @@
orig_tmp = tmp = HeapAlloc(GetProcessHeap(), 0, tmp_len * sizeof(WCHAR));
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) {
@@ -162,7 +170,7 @@
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 +184,7 @@
TRACE("Succeeded in getting the container instance\n");
}
-on_error:
+out:
HeapFree(GetProcessHeap(), 0, orig_tmp);
return hr;
}
Modified: trunk/reactos/dll/directx/wine/dxdiagn/fil_data.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxdiagn/f…
==============================================================================
--- trunk/reactos/dll/directx/wine/dxdiagn/fil_data.idl [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dxdiagn/fil_data.idl [iso-8859-1] Tue Nov 24 10:59:31
2015
@@ -15,6 +15,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+
+#pragma makedep header
import "objidl.idl";
import "strmif.idl";
Modified: trunk/reactos/dll/directx/wine/dxdiagn/provider.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dxdiagn/p…
==============================================================================
--- trunk/reactos/dll/directx/wine/dxdiagn/provider.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dxdiagn/provider.c [iso-8859-1] Tue Nov 24 10:59:31
2015
@@ -24,10 +24,12 @@
#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>
static const WCHAR szEmpty[] = {0};
@@ -321,7 +323,7 @@
return E_OUTOFMEMORY;
V_VT(&prop->vProp) = VT_BOOL;
- V_BOOL(&prop->vProp) = data;
+ V_BOOL(&prop->vProp) = data ? VARIANT_TRUE : VARIANT_FALSE;
list_add_tail(&node->properties, &prop->entry);
++node->nProperties;
@@ -1175,11 +1177,85 @@
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);
@@ -1188,11 +1264,27 @@
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;
}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Nov 24 10:59:31 2015
@@ -36,7 +36,7 @@
reactos/dll/directx/wine/dplay # Synced to WineStaging-1.7.47
reactos/dll/directx/wine/dplayx # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/dsound # Synced to Wine-1.3.29
-reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.7.47
+reactos/dll/directx/wine/dxdiagn # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/msdmo # Synced to WineStaging-1.7.47
reactos/dll/directx/wine/qedit # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/quartz # Synced to WineStaging-1.7.47