Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
710abd65
Commit
710abd65
authored
Nov 16, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement Win32_OperatingSystem.TotalVirtualMemorySize.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
474d5be5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
builtin.c
dlls/wbemprox/builtin.c
+6
-1
query.c
dlls/wbemprox/tests/query.c
+22
-0
No files found.
dlls/wbemprox/builtin.c
View file @
710abd65
...
...
@@ -342,6 +342,8 @@ static const WCHAR prop_threadcountW[] =
{
'T'
,
'h'
,
'r'
,
'e'
,
'a'
,
'd'
,
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
0
};
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
};
static
const
WCHAR
prop_totalvirtualmemorysizeW
[]
=
{
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
'V'
,
'i'
,
'r'
,
't'
,
'u'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
prop_totalvisiblememorysizeW
[]
=
{
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
'V'
,
'i'
,
's'
,
'i'
,
'b'
,
'l'
,
'e'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
prop_typeW
[]
=
...
...
@@ -517,6 +519,7 @@ static const struct column col_os[] =
{
prop_servicepackminorW
,
CIM_UINT16
,
VT_I4
},
{
prop_suitemaskW
,
CIM_UINT32
,
VT_I4
},
{
prop_systemdirectoryW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_totalvirtualmemorysizeW
,
CIM_UINT64
},
{
prop_totalvisiblememorysizeW
,
CIM_UINT64
},
{
prop_versionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
}
};
...
...
@@ -899,6 +902,7 @@ struct record_operatingsystem
UINT16
servicepackminor
;
UINT32
suitemask
;
const
WCHAR
*
systemdirectory
;
UINT64
totalvirtualmemorysize
;
UINT64
totalvisiblememorysize
;
const
WCHAR
*
version
;
};
...
...
@@ -2763,7 +2767,8 @@ static enum fill_status fill_os( struct table *table, const struct expr *cond )
rec
->
servicepackminor
=
ver
.
wServicePackMinor
;
rec
->
suitemask
=
272
;
/* Single User + Terminal */
rec
->
systemdirectory
=
get_systemdirectory
();
rec
->
totalvisiblememorysize
=
get_total_physical_memory
()
/
1024
;
rec
->
totalvirtualmemorysize
=
get_total_physical_memory
()
/
1024
;
rec
->
totalvisiblememorysize
=
rec
->
totalvirtualmemorysize
;
rec
->
version
=
get_osversion
(
&
ver
);
if
(
!
match_row
(
table
,
row
,
cond
,
&
status
))
free_row_values
(
table
,
row
);
else
row
++
;
...
...
dlls/wbemprox/tests/query.c
View file @
710abd65
...
...
@@ -1066,6 +1066,10 @@ static void test_OperatingSystem( IWbemServices *services )
{
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'P'
,
'a'
,
'c'
,
'k'
,
'M'
,
'a'
,
'j'
,
'o'
,
'r'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
servicepackminorW
[]
=
{
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'P'
,
'a'
,
'c'
,
'k'
,
'M'
,
'i'
,
'n'
,
'o'
,
'r'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
totalvisiblememorysizeW
[]
=
{
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
'V'
,
'i'
,
's'
,
'i'
,
'b'
,
'l'
,
'e'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
totalvirtualmemorysizeW
[]
=
{
'T'
,
'o'
,
't'
,
'a'
,
'l'
,
'V'
,
'i'
,
'r'
,
't'
,
'u'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
BSTR
wql
=
SysAllocString
(
wqlW
),
query
=
SysAllocString
(
queryW
);
IEnumWbemClassObject
*
result
;
IWbemClassObject
*
obj
;
...
...
@@ -1170,6 +1174,24 @@ static void test_OperatingSystem( IWbemServices *services )
trace
(
"version: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
totalvisiblememorysizeW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get visible memory size %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_UINT64
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"totalvisiblememorysize %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
type
=
0xdeadbeef
;
VariantInit
(
&
val
);
hr
=
IWbemClassObject_Get
(
obj
,
totalvirtualmemorysizeW
,
0
,
&
val
,
&
type
,
NULL
);
ok
(
hr
==
S_OK
,
"failed to get virtual memory size %08x
\n
"
,
hr
);
ok
(
V_VT
(
&
val
)
==
VT_BSTR
,
"unexpected variant type 0x%x
\n
"
,
V_VT
(
&
val
)
);
ok
(
type
==
CIM_UINT64
,
"unexpected type 0x%x
\n
"
,
type
);
trace
(
"totalvirtualmemorysize %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
val
))
);
VariantClear
(
&
val
);
IWbemClassObject_Release
(
obj
);
IEnumWbemClassObject_Release
(
result
);
SysFreeString
(
query
);
...
...
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