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
fe6127dc
Commit
fe6127dc
authored
Mar 02, 2018
by
Michael Müller
Committed by
Alexandre Julliard
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add FreePhysicalMemory to Win32_OperatingSystem.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0197f54a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
builtin.c
dlls/wbemprox/builtin.c
+14
-0
No files found.
dlls/wbemprox/builtin.c
View file @
fe6127dc
...
...
@@ -231,6 +231,8 @@ static const WCHAR prop_flavorW[] =
{
'F'
,
'l'
,
'a'
,
'v'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
prop_freespaceW
[]
=
{
'F'
,
'r'
,
'e'
,
'e'
,
'S'
,
'p'
,
'a'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
prop_freephysicalmemoryW
[]
=
{
'F'
,
'r'
,
'e'
,
'e'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'M'
,
'e'
,
'm'
,
'o'
,
'r'
,
'y'
,
0
};
static
const
WCHAR
prop_handleW
[]
=
{
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
prop_horizontalresolutionW
[]
=
...
...
@@ -559,6 +561,7 @@ static const struct column col_os[] =
{
prop_codesetW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_countrycodeW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_csdversionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_freephysicalmemoryW
,
CIM_UINT64
},
{
prop_installdateW
,
CIM_DATETIME
},
{
prop_lastbootuptimeW
,
CIM_DATETIME
|
COL_FLAG_DYNAMIC
},
{
prop_localdatetimeW
,
CIM_DATETIME
|
COL_FLAG_DYNAMIC
},
...
...
@@ -972,6 +975,7 @@ struct record_operatingsystem
const
WCHAR
*
codeset
;
const
WCHAR
*
countrycode
;
const
WCHAR
*
csdversion
;
UINT64
freephysicalmemory
;
const
WCHAR
*
installdate
;
const
WCHAR
*
lastbootuptime
;
const
WCHAR
*
localdatetime
;
...
...
@@ -1362,6 +1366,15 @@ static UINT64 get_total_physical_memory(void)
return
status
.
ullTotalPhys
;
}
static
UINT64
get_available_physical_memory
(
void
)
{
MEMORYSTATUSEX
status
;
status
.
dwLength
=
sizeof
(
status
);
if
(
!
GlobalMemoryStatusEx
(
&
status
))
return
1024
*
1024
*
1024
;
return
status
.
ullAvailPhys
;
}
static
WCHAR
*
get_computername
(
void
)
{
WCHAR
*
ret
;
...
...
@@ -2941,6 +2954,7 @@ static enum fill_status fill_os( struct table *table, const struct expr *cond )
rec
->
codeset
=
get_codeset
();
rec
->
countrycode
=
get_countrycode
();
rec
->
csdversion
=
ver
.
szCSDVersion
[
0
]
?
heap_strdupW
(
ver
.
szCSDVersion
)
:
NULL
;
rec
->
freephysicalmemory
=
get_available_physical_memory
()
/
1024
;
rec
->
installdate
=
os_installdateW
;
rec
->
lastbootuptime
=
get_lastbootuptime
();
rec
->
localdatetime
=
get_localdatetime
();
...
...
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