Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
0c899bf4
Commit
0c899bf4
authored
12 years ago
by
Hans Leidekker
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wbemprox: Implement Win32_ComputerSystem.TotalPhysicalMemory.
parent
ca471b87
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wbemprox/builtin.c
+16
-1
16 additions, 1 deletion
dlls/wbemprox/builtin.c
with
16 additions
and
1 deletion
dlls/wbemprox/builtin.c
+
16
−
1
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment