Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
097a31bb
Commit
097a31bb
authored
Apr 03, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Apr 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxdiagn: Add operating system string properties to the DxDiag_SystemInfo container.
parent
ca854b82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
provider.c
dlls/dxdiagn/provider.c
+32
-0
container.c
dlls/dxdiagn/tests/container.c
+12
-0
No files found.
dlls/dxdiagn/provider.c
View file @
097a31bb
...
...
@@ -511,6 +511,34 @@ static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node)
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
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)
if
(
FAILED
(
hr
))
return
hr
;
hr
=
fill_os_string_information
(
node
,
&
info
);
if
(
FAILED
(
hr
))
return
hr
;
return
S_OK
;
}
...
...
dlls/dxdiagn/tests/container.c
View file @
097a31bb
...
...
@@ -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
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
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
{
...
...
@@ -824,6 +830,12 @@ static void test_DxDiag_SystemInfo(void)
{
szPhysicalMemoryEnglish
,
VT_BSTR
},
{
szPageFileLocalized
,
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment