Andrew Nguyen : dxdiagn: Add some machine name properties to the DxDiag_SystemInfo container.
Alexandre Julliard
julliard at winehq.org
Mon Apr 4 10:10:53 CDT 2011
Module: wine
Branch: master
Commit: ff1285aca7b5d09d727316c85c35cfa38a63466f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ff1285aca7b5d09d727316c85c35cfa38a63466f
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Sun Apr 3 20:55:17 2011 -0500
dxdiagn: Add some machine name properties to the DxDiag_SystemInfo container.
---
dlls/dxdiagn/provider.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c
index 9a6ba6b..9dcb99f 100644
--- a/dlls/dxdiagn/provider.c
+++ b/dlls/dxdiagn/provider.c
@@ -366,11 +366,14 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
static const WCHAR dwOSBuildNumber[] = {'d','w','O','S','B','u','i','l','d','N','u','m','b','e','r',0};
static const WCHAR dwOSPlatformID[] = {'d','w','O','S','P','l','a','t','f','o','r','m','I','D',0};
static const WCHAR szCSDVersion[] = {'s','z','C','S','D','V','e','r','s','i','o','n',0};
+ 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};
+ 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};
HRESULT hr;
MEMORYSTATUSEX msex;
OSVERSIONINFOW info;
- WCHAR buffer[MAX_PATH];
+ DWORD count;
+ WCHAR buffer[MAX_PATH], computer_name[MAX_COMPUTERNAME_LENGTH + 1];
hr = add_ui4_property(node, dwDirectXVersionMajor, 9);
if (FAILED(hr))
@@ -440,6 +443,18 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
if (FAILED(hr))
return hr;
+ count = sizeof(computer_name)/sizeof(WCHAR);
+ if (!GetComputerNameW(computer_name, &count))
+ return E_FAIL;
+
+ hr = add_bstr_property(node, szMachineNameLocalized, computer_name);
+ if (FAILED(hr))
+ return hr;
+
+ hr = add_bstr_property(node, szMachineNameEnglish, computer_name);
+ if (FAILED(hr))
+ return hr;
+
return S_OK;
}
More information about the wine-cvs
mailing list