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
0c899bf4
Commit
0c899bf4
authored
Jun 27, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement Win32_ComputerSystem.TotalPhysicalMemory.
parent
ca471b87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
builtin.c
dlls/wbemprox/builtin.c
+16
-1
No files found.
dlls/wbemprox/builtin.c
View file @
0c899bf4
...
...
@@ -99,7 +99,10 @@ static const WCHAR prop_systemdirectoryW[] =
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'o'
,
'r'
,
'y'
,
0
};
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
};
/* column definitions must be kept in sync with record structures below */
static
const
struct
column
col_bios
[]
=
{
{
prop_descriptionW
,
CIM_STRING
},
...
...
@@ -113,7 +116,8 @@ static const struct column col_compsys[] =
{
prop_manufacturerW
,
CIM_STRING
},
{
prop_modelW
,
CIM_STRING
},
{
prop_numlogicalprocessorsW
,
CIM_UINT32
},
{
prop_numprocessorsW
,
CIM_UINT32
}
{
prop_numprocessorsW
,
CIM_UINT32
},
{
prop_totalphysicalmemoryW
,
CIM_UINT64
}
};
static
const
struct
column
col_networkadapter
[]
=
{
...
...
@@ -195,6 +199,7 @@ struct record_computersystem
const
WCHAR
*
model
;
UINT32
num_logical_processors
;
UINT32
num_processors
;
UINT64
total_physical_memory
;
};
struct
record_networkadapter
{
...
...
@@ -247,6 +252,15 @@ static UINT get_processor_count(void)
return
info
.
NumberOfProcessors
;
}
static
UINT64
get_total_physical_memory
(
void
)
{
MEMORYSTATUSEX
status
;
status
.
dwLength
=
sizeof
(
status
);
if
(
!
GlobalMemoryStatusEx
(
&
status
))
return
1024
*
1024
*
1024
;
return
status
.
ullTotalPhys
;
}
static
void
fill_compsys
(
struct
table
*
table
)
{
struct
record_computersystem
*
rec
;
...
...
@@ -259,6 +273,7 @@ static void fill_compsys( struct table *table )
rec
->
model
=
compsys_modelW
;
rec
->
num_logical_processors
=
get_processor_count
();
rec
->
num_processors
=
rec
->
num_logical_processors
;
rec
->
total_physical_memory
=
get_total_physical_memory
();
TRACE
(
"created 1 row
\n
"
);
table
->
num_rows
=
1
;
...
...
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