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
6ecf912a
Commit
6ecf912a
authored
Sep 17, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement Win32_WinSAT.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18ff2817
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
1 deletion
+104
-1
builtin.c
dlls/wbemprox/builtin.c
+48
-1
query.c
dlls/wbemprox/tests/query.c
+56
-0
No files found.
dlls/wbemprox/builtin.c
View file @
6ecf912a
...
@@ -116,6 +116,8 @@ static const WCHAR class_systemenclosureW[] =
...
@@ -116,6 +116,8 @@ static const WCHAR class_systemenclosureW[] =
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'E'
,
'n'
,
'c'
,
'l'
,
'o'
,
's'
,
'u'
,
'r'
,
'e'
,
0
};
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'E'
,
'n'
,
'c'
,
'l'
,
'o'
,
's'
,
'u'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
class_videocontrollerW
[]
=
static
const
WCHAR
class_videocontrollerW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'V'
,
'i'
,
'd'
,
'e'
,
'o'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'V'
,
'i'
,
'd'
,
'e'
,
'o'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'l'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
class_winsatW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'W'
,
'i'
,
'n'
,
'S'
,
'A'
,
'T'
,
0
};
static
const
WCHAR
prop_accountnameW
[]
=
static
const
WCHAR
prop_accountnameW
[]
=
{
'A'
,
'c'
,
'c'
,
'o'
,
'u'
,
'n'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
{
'A'
,
'c'
,
'c'
,
'o'
,
'u'
,
'n'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
...
@@ -175,6 +177,8 @@ static const WCHAR prop_configuredclockspeedW[] =
...
@@ -175,6 +177,8 @@ static const WCHAR prop_configuredclockspeedW[] =
{
'C'
,
'o'
,
'n'
,
'f'
,
'i'
,
'g'
,
'u'
,
'r'
,
'e'
,
'd'
,
'C'
,
'l'
,
'o'
,
'c'
,
'k'
,
'S'
,
'p'
,
'e'
,
'e'
,
'd'
,
0
};
{
'C'
,
'o'
,
'n'
,
'f'
,
'i'
,
'g'
,
'u'
,
'r'
,
'e'
,
'd'
,
'C'
,
'l'
,
'o'
,
'c'
,
'k'
,
'S'
,
'p'
,
'e'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
prop_countrycodeW
[]
=
static
const
WCHAR
prop_countrycodeW
[]
=
{
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
'r'
,
'y'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
{
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
'r'
,
'y'
,
'C'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
prop_cpuscoreW
[]
=
{
'C'
,
'P'
,
'U'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
prop_cpustatusW
[]
=
static
const
WCHAR
prop_cpustatusW
[]
=
{
'C'
,
'p'
,
'u'
,
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
{
'C'
,
'p'
,
'u'
,
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
static
const
WCHAR
prop_csdversionW
[]
=
static
const
WCHAR
prop_csdversionW
[]
=
...
@@ -197,6 +201,8 @@ static const WCHAR prop_currenttimezoneW[] =
...
@@ -197,6 +201,8 @@ static const WCHAR prop_currenttimezoneW[] =
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'T'
,
'i'
,
'm'
,
'e'
,
'Z'
,
'o'
,
'n'
,
'e'
,
0
};
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'T'
,
'i'
,
'm'
,
'e'
,
'Z'
,
'o'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
prop_currentverticalresW
[]
=
static
const
WCHAR
prop_currentverticalresW
[]
=
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
't'
,
'i'
,
'c'
,
'a'
,
'l'
,
'R'
,
'e'
,
's'
,
'o'
,
'l'
,
'u'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
't'
,
'i'
,
'c'
,
'a'
,
'l'
,
'R'
,
'e'
,
's'
,
'o'
,
'l'
,
'u'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_d3dscoreW
[]
=
{
'D'
,
'3'
,
'D'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
prop_datawidthW
[]
=
static
const
WCHAR
prop_datawidthW
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
'W'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
{
'D'
,
'a'
,
't'
,
'a'
,
'W'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
static
const
WCHAR
prop_defaultipgatewayW
[]
=
static
const
WCHAR
prop_defaultipgatewayW
[]
=
...
@@ -217,6 +223,8 @@ static const WCHAR prop_dhcpenabledW[] =
...
@@ -217,6 +223,8 @@ static const WCHAR prop_dhcpenabledW[] =
{
'D'
,
'H'
,
'C'
,
'P'
,
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
{
'D'
,
'H'
,
'C'
,
'P'
,
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
prop_directionW
[]
=
static
const
WCHAR
prop_directionW
[]
=
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_diskscoreW
[]
=
{
'D'
,
'i'
,
's'
,
'k'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
prop_displaynameW
[]
=
static
const
WCHAR
prop_displaynameW
[]
=
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
prop_diskindexW
[]
=
static
const
WCHAR
prop_diskindexW
[]
=
...
@@ -251,6 +259,8 @@ static const WCHAR prop_freephysicalmemoryW[] =
...
@@ -251,6 +259,8 @@ static const WCHAR prop_freephysicalmemoryW[] =
{
'F'
,
'r'
,
'e'
,
'e'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
0
};
{
'F'
,
'r'
,
'e'
,
'e'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
0
};
static
const
WCHAR
prop_handleW
[]
=
static
const
WCHAR
prop_handleW
[]
=
{
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
0
};
{
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
prop_graphicsscoreW
[]
=
{
'G'
,
'r'
,
'a'
,
'p'
,
'h'
,
'i'
,
'c'
,
's'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
prop_horizontalresolutionW
[]
=
static
const
WCHAR
prop_horizontalresolutionW
[]
=
{
'H'
,
'o'
,
'r'
,
'i'
,
'z'
,
'o'
,
'n'
,
't'
,
'a'
,
'l'
,
'R'
,
'e'
,
's'
,
'o'
,
'l'
,
'u'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'H'
,
'o'
,
'r'
,
'i'
,
'z'
,
'o'
,
'n'
,
't'
,
'a'
,
'l'
,
'R'
,
'e'
,
's'
,
'o'
,
'l'
,
'u'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_idW
[]
=
static
const
WCHAR
prop_idW
[]
=
...
@@ -303,6 +313,8 @@ static const WCHAR prop_mediatypeW[] =
...
@@ -303,6 +313,8 @@ static const WCHAR prop_mediatypeW[] =
{
'M'
,
'e'
,
'd'
,
'i'
,
'a'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
{
'M'
,
'e'
,
'd'
,
'i'
,
'a'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
prop_memberW
[]
=
static
const
WCHAR
prop_memberW
[]
=
{
'M'
,
'e'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
{
'M'
,
'e'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
prop_memoryscoreW
[]
=
{
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
prop_memorytypeW
[]
=
static
const
WCHAR
prop_memorytypeW
[]
=
{
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
{
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
prop_methodW
[]
=
static
const
WCHAR
prop_methodW
[]
=
...
@@ -413,6 +425,8 @@ static const WCHAR prop_tagW[] =
...
@@ -413,6 +425,8 @@ static const WCHAR prop_tagW[] =
{
'T'
,
'a'
,
'g'
,
0
};
{
'T'
,
'a'
,
'g'
,
0
};
static
const
WCHAR
prop_threadcountW
[]
=
static
const
WCHAR
prop_threadcountW
[]
=
{
'T'
,
'h'
,
'r'
,
'e'
,
'a'
,
'd'
,
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
0
};
{
'T'
,
'h'
,
'r'
,
'e'
,
'a'
,
'd'
,
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
0
};
static
const
WCHAR
prop_timetakenW
[]
=
{
'T'
,
'i'
,
'm'
,
'e'
,
'T'
,
'a'
,
'k'
,
'e'
,
'n'
,
0
};
static
const
WCHAR
prop_totalphysicalmemoryW
[]
=
static
const
WCHAR
prop_totalphysicalmemoryW
[]
=
{
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
0
};
{
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
0
};
static
const
WCHAR
prop_totalvirtualmemorysizeW
[]
=
static
const
WCHAR
prop_totalvirtualmemorysizeW
[]
=
...
@@ -445,6 +459,10 @@ static const WCHAR prop_volumenameW[] =
...
@@ -445,6 +459,10 @@ static const WCHAR prop_volumenameW[] =
{
'V'
,
'o'
,
'l'
,
'u'
,
'm'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
{
'V'
,
'o'
,
'l'
,
'u'
,
'm'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
prop_volumeserialnumberW
[]
=
static
const
WCHAR
prop_volumeserialnumberW
[]
=
{
'V'
,
'o'
,
'l'
,
'u'
,
'm'
,
'e'
,
'S'
,
'e'
,
'r'
,
'i'
,
'a'
,
'l'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
{
'V'
,
'o'
,
'l'
,
'u'
,
'm'
,
'e'
,
'S'
,
'e'
,
'r'
,
'i'
,
'a'
,
'l'
,
'N'
,
'u'
,
'm'
,
'b'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
prop_winsatassessmentstateW
[]
=
{
'W'
,
'i'
,
'n'
,
'S'
,
'A'
,
'T'
,
'A'
,
's'
,
's'
,
'e'
,
's'
,
's'
,
'm'
,
'e'
,
'n'
,
't'
,
'S'
,
't'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
prop_winsprlevelW
[]
=
{
'W'
,
'i'
,
'n'
,
'S'
,
'P'
,
'R'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
prop_workingsetsizeW
[]
=
static
const
WCHAR
prop_workingsetsizeW
[]
=
{
'W'
,
'o'
,
'r'
,
'k'
,
'i'
,
'n'
,
'g'
,
'S'
,
'e'
,
't'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
{
'W'
,
'o'
,
'r'
,
'k'
,
'i'
,
'n'
,
'g'
,
'S'
,
'e'
,
't'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
...
@@ -802,6 +820,17 @@ static const struct column col_videocontroller[] =
...
@@ -802,6 +820,17 @@ static const struct column col_videocontroller[] =
{
prop_videomodedescriptionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_videomodedescriptionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_videoprocessorW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_videoprocessorW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
};
};
static
const
struct
column
col_winsat
[]
=
{
{
prop_cpuscoreW
,
CIM_REAL32
},
{
prop_d3dscoreW
,
CIM_REAL32
},
{
prop_diskscoreW
,
CIM_REAL32
},
{
prop_graphicsscoreW
,
CIM_REAL32
},
{
prop_memoryscoreW
,
CIM_REAL32
},
{
prop_timetakenW
,
CIM_STRING
|
COL_FLAG_KEY
},
{
prop_winsatassessmentstateW
,
CIM_UINT32
,
VT_I4
},
{
prop_winsprlevelW
,
CIM_REAL32
},
};
static
const
WCHAR
baseboard_manufacturerW
[]
=
static
const
WCHAR
baseboard_manufacturerW
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'l'
,
' '
,
'C'
,
'o'
,
'r'
,
'p'
,
'o'
,
'r'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'I'
,
'n'
,
't'
,
'e'
,
'l'
,
' '
,
'C'
,
'o'
,
'r'
,
'p'
,
'o'
,
'r'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
...
@@ -897,6 +926,8 @@ static const WCHAR videocontroller_driverversionW[] =
...
@@ -897,6 +926,8 @@ static const WCHAR videocontroller_driverversionW[] =
{
'1'
,
'.'
,
'0'
,
0
};
{
'1'
,
'.'
,
'0'
,
0
};
static
const
WCHAR
videocontroller_statusW
[]
=
static
const
WCHAR
videocontroller_statusW
[]
=
{
'O'
,
'K'
,
0
};
{
'O'
,
'K'
,
0
};
static
const
WCHAR
winsat_timetakenW
[]
=
{
'M'
,
'o'
,
's'
,
't'
,
'R'
,
'e'
,
'c'
,
'e'
,
'n'
,
't'
,
'A'
,
's'
,
's'
,
'e'
,
's'
,
's'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
#include "pshpack1.h"
#include "pshpack1.h"
struct
record_associator
struct
record_associator
...
@@ -1252,6 +1283,17 @@ struct record_videocontroller
...
@@ -1252,6 +1283,17 @@ struct record_videocontroller
const
WCHAR
*
videomodedescription
;
const
WCHAR
*
videomodedescription
;
const
WCHAR
*
videoprocessor
;
const
WCHAR
*
videoprocessor
;
};
};
struct
record_winsat
{
FLOAT
cpuscore
;
FLOAT
d3dscore
;
FLOAT
diskscrore
;
FLOAT
graphicsscore
;
FLOAT
memoryscore
;
const
WCHAR
*
timetaken
;
UINT32
winsatassessmentstate
;
FLOAT
winsprlevel
;
};
#include "poppack.h"
#include "poppack.h"
static
const
struct
record_associator
data_associator
[]
=
static
const
struct
record_associator
data_associator
[]
=
...
@@ -1325,6 +1367,10 @@ static const struct record_systemsecurity data_systemsecurity[] =
...
@@ -1325,6 +1367,10 @@ static const struct record_systemsecurity data_systemsecurity[] =
{
{
{
security_get_sd
,
security_set_sd
}
{
security_get_sd
,
security_set_sd
}
};
};
static
const
struct
record_winsat
data_winsat
[]
=
{
{
8
.
0
f
,
8
.
0
f
,
8
.
0
f
,
8
.
0
f
,
8
.
0
f
,
winsat_timetakenW
,
1
/* Valid */
,
8
.
0
f
},
};
/* check if row matches condition and update status */
/* check if row matches condition and update status */
static
BOOL
match_row
(
const
struct
table
*
table
,
UINT
row
,
const
struct
expr
*
cond
,
enum
fill_status
*
status
)
static
BOOL
match_row
(
const
struct
table
*
table
,
UINT
row
,
const
struct
expr
*
cond
,
enum
fill_status
*
status
)
...
@@ -4360,7 +4406,8 @@ static struct table builtin_classes[] =
...
@@ -4360,7 +4406,8 @@ static struct table builtin_classes[] =
{
class_stdregprovW
,
C
(
col_stdregprov
),
D
(
data_stdregprov
)
},
{
class_stdregprovW
,
C
(
col_stdregprov
),
D
(
data_stdregprov
)
},
{
class_systemsecurityW
,
C
(
col_systemsecurity
),
D
(
data_systemsecurity
)
},
{
class_systemsecurityW
,
C
(
col_systemsecurity
),
D
(
data_systemsecurity
)
},
{
class_systemenclosureW
,
C
(
col_systemenclosure
),
0
,
0
,
NULL
,
fill_systemenclosure
},
{
class_systemenclosureW
,
C
(
col_systemenclosure
),
0
,
0
,
NULL
,
fill_systemenclosure
},
{
class_videocontrollerW
,
C
(
col_videocontroller
),
0
,
0
,
NULL
,
fill_videocontroller
}
{
class_videocontrollerW
,
C
(
col_videocontroller
),
0
,
0
,
NULL
,
fill_videocontroller
},
{
class_winsatW
,
C
(
col_winsat
),
D
(
data_winsat
)
},
};
};
#undef C
#undef C
#undef D
#undef D
...
...
dlls/wbemprox/tests/query.c
View file @
6ecf912a
...
@@ -339,6 +339,9 @@ static void _check_property( ULONG line, IWbemClassObject *obj, const WCHAR *pro
...
@@ -339,6 +339,9 @@ static void _check_property( ULONG line, IWbemClassObject *obj, const WCHAR *pro
case
VT_I4
:
case
VT_I4
:
trace
(
"%s: %d
\n
"
,
wine_dbgstr_w
(
prop
),
V_I4
(
&
val
)
);
trace
(
"%s: %d
\n
"
,
wine_dbgstr_w
(
prop
),
V_I4
(
&
val
)
);
break
;
break
;
case
VT_R4
:
trace
(
"%s: %f
\n
"
,
wine_dbgstr_w
(
prop
),
V_R4
(
&
val
)
);
break
;
default:
default:
break
;
break
;
}
}
...
@@ -1643,6 +1646,58 @@ static void test_Win32_PnPEntity( IWbemServices *services )
...
@@ -1643,6 +1646,58 @@ static void test_Win32_PnPEntity( IWbemServices *services )
IEnumWbemClassObject_Release
(
enm
);
IEnumWbemClassObject_Release
(
enm
);
}
}
static
void
test_Win32_WinSAT
(
IWbemServices
*
services
)
{
static
const
WCHAR
cpuscoreW
[]
=
{
'C'
,
'P'
,
'U'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
d3dscoreW
[]
=
{
'D'
,
'3'
,
'D'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
diskscoreW
[]
=
{
'D'
,
'i'
,
's'
,
'k'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
graphicsscoreW
[]
=
{
'G'
,
'r'
,
'a'
,
'p'
,
'h'
,
'i'
,
'c'
,
's'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
memoryscoreW
[]
=
{
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'S'
,
'c'
,
'o'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
winsatassessmentstateW
[]
=
{
'W'
,
'i'
,
'n'
,
'S'
,
'A'
,
'T'
,
'A'
,
's'
,
's'
,
'e'
,
's'
,
's'
,
'm'
,
'e'
,
'n'
,
't'
,
'S'
,
't'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
winsprlevelW
[]
=
{
'W'
,
'i'
,
'n'
,
'S'
,
'P'
,
'R'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
queryW
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'W'
,
'i'
,
'n'
,
'S'
,
'A'
,
'T'
,
0
};
BSTR
wql
=
SysAllocString
(
wqlW
),
query
=
SysAllocString
(
queryW
);
IEnumWbemClassObject
*
result
;
IWbemClassObject
*
obj
;
HRESULT
hr
;
DWORD
count
;
hr
=
IWbemServices_ExecQuery
(
services
,
wql
,
query
,
0
,
NULL
,
&
result
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
WBEM_E_INVALID_CLASS
)
/* win2k8 */
,
"got %08x
\n
"
,
hr
);
if
(
hr
==
WBEM_E_INVALID_CLASS
)
{
win_skip
(
"class not found
\n
"
);
return
;
}
for
(;;)
{
hr
=
IEnumWbemClassObject_Next
(
result
,
10000
,
1
,
&
obj
,
&
count
);
if
(
hr
!=
S_OK
)
break
;
check_property
(
obj
,
cpuscoreW
,
VT_R4
,
CIM_REAL32
);
check_property
(
obj
,
d3dscoreW
,
VT_R4
,
CIM_REAL32
);
check_property
(
obj
,
diskscoreW
,
VT_R4
,
CIM_REAL32
);
check_property
(
obj
,
graphicsscoreW
,
VT_R4
,
CIM_REAL32
);
check_property
(
obj
,
memoryscoreW
,
VT_R4
,
CIM_REAL32
);
check_property
(
obj
,
winsatassessmentstateW
,
VT_I4
,
CIM_UINT32
);
check_property
(
obj
,
winsprlevelW
,
VT_R4
,
CIM_REAL32
);
IWbemClassObject_Release
(
obj
);
}
IEnumWbemClassObject_Release
(
result
);
SysFreeString
(
query
);
SysFreeString
(
wql
);
}
START_TEST
(
query
)
START_TEST
(
query
)
{
{
static
const
WCHAR
cimv2W
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'\\'
,
'C'
,
'I'
,
'M'
,
'V'
,
'2'
,
0
};
static
const
WCHAR
cimv2W
[]
=
{
'R'
,
'O'
,
'O'
,
'T'
,
'\\'
,
'C'
,
'I'
,
'M'
,
'V'
,
'2'
,
0
};
...
@@ -1693,6 +1748,7 @@ START_TEST(query)
...
@@ -1693,6 +1748,7 @@ START_TEST(query)
test_Win32_Service
(
services
);
test_Win32_Service
(
services
);
test_Win32_SystemEnclosure
(
services
);
test_Win32_SystemEnclosure
(
services
);
test_Win32_VideoController
(
services
);
test_Win32_VideoController
(
services
);
test_Win32_WinSAT
(
services
);
SysFreeString
(
path
);
SysFreeString
(
path
);
IWbemServices_Release
(
services
);
IWbemServices_Release
(
services
);
...
...
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