Commit 097a31bb authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

dxdiagn: Add operating system string properties to the DxDiag_SystemInfo container.

parent ca854b82
...@@ -511,6 +511,34 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node) ...@@ -511,6 +511,34 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
return S_OK; return S_OK;
} }
static HRESULT fill_os_string_information(IDxDiagContainerImpl_Container *node, OSVERSIONINFOW *info)
{
static const WCHAR winxpW[] = {'W','i','n','d','o','w','s',' ','X','P',' ','P','r','o','f','e','s','s','i','o','n','a','l',0};
static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0};
static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0};
static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0};
static const WCHAR *prop_list[] = {szOSLocalized, szOSExLocalized, szOSExLongLocalized,
szOSEnglish, szOSExEnglish, szOSExLongEnglish};
size_t i;
HRESULT hr;
/* FIXME: OS detection should be performed, and localized OS strings
* should contain translated versions of the "build" phrase. */
for (i = 0; i < sizeof(prop_list)/sizeof(prop_list[0]); i++)
{
hr = add_bstr_property(node, prop_list[i], winxpW);
if (FAILED(hr))
return hr;
}
return S_OK;
}
static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
{ {
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}; 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};
...@@ -665,6 +693,10 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) ...@@ -665,6 +693,10 @@ static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node)
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
hr = fill_os_string_information(node, &info);
if (FAILED(hr))
return hr;
return S_OK; return S_OK;
} }
......
...@@ -791,6 +791,12 @@ static void test_DxDiag_SystemInfo(void) ...@@ -791,6 +791,12 @@ static void test_DxDiag_SystemInfo(void)
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}; 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};
static const WCHAR szPageFileLocalized[] = {'s','z','P','a','g','e','F','i','l','e','L','o','c','a','l','i','z','e','d',0}; static const WCHAR szPageFileLocalized[] = {'s','z','P','a','g','e','F','i','l','e','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szPageFileEnglish[] = {'s','z','P','a','g','e','F','i','l','e','E','n','g','l','i','s','h',0}; static const WCHAR szPageFileEnglish[] = {'s','z','P','a','g','e','F','i','l','e','E','n','g','l','i','s','h',0};
static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0};
static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0};
static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0};
static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0};
static const struct static const struct
{ {
...@@ -824,6 +830,12 @@ static void test_DxDiag_SystemInfo(void) ...@@ -824,6 +830,12 @@ static void test_DxDiag_SystemInfo(void)
{szPhysicalMemoryEnglish, VT_BSTR}, {szPhysicalMemoryEnglish, VT_BSTR},
{szPageFileLocalized, VT_BSTR}, {szPageFileLocalized, VT_BSTR},
{szPageFileEnglish, VT_BSTR}, {szPageFileEnglish, VT_BSTR},
{szOSLocalized, VT_BSTR},
{szOSExLocalized, VT_BSTR},
{szOSExLongLocalized, VT_BSTR},
{szOSEnglish, VT_BSTR},
{szOSExEnglish, VT_BSTR},
{szOSExLongEnglish, VT_BSTR},
}; };
HRESULT hr; HRESULT hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment