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
bc66ef04
Commit
bc66ef04
authored
Jun 19, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add a partial Win32_OperatingSystem class implementation.
parent
9e748591
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
builtin.c
dlls/wbemprox/builtin.c
+43
-0
No files found.
dlls/wbemprox/builtin.c
View file @
bc66ef04
...
...
@@ -17,6 +17,8 @@
*/
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "config.h"
#include <stdarg.h>
...
...
@@ -35,6 +37,8 @@ static const WCHAR class_biosW[] =
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'B'
,
'I'
,
'O'
,
'S'
,
0
};
static
const
WCHAR
class_compsysW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'C'
,
'o'
,
'm'
,
'p'
,
'u'
,
't'
,
'e'
,
'r'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
static
const
WCHAR
class_osW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'O'
,
'p'
,
'e'
,
'r'
,
'a'
,
't'
,
'i'
,
'n'
,
'g'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
static
const
WCHAR
class_processW
[]
=
{
'W'
,
'i'
,
'n'
,
'3'
,
'2'
,
'_'
,
'P'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
0
};
static
const
WCHAR
class_processorW
[]
=
...
...
@@ -48,6 +52,8 @@ static const WCHAR prop_manufacturerW[] =
{
'M'
,
'a'
,
'n'
,
'u'
,
'f'
,
'a'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
prop_modelW
[]
=
{
'M'
,
'o'
,
'd'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
prop_osarchitectureW
[]
=
{
'O'
,
'S'
,
'A'
,
'r'
,
'c'
,
'h'
,
'i'
,
't'
,
'e'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
prop_pprocessidW
[]
=
{
'P'
,
'a'
,
'r'
,
'e'
,
'n'
,
't'
,
'P'
,
'r'
,
'o'
,
'c'
,
'e'
,
's'
,
's'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
prop_processidW
[]
=
...
...
@@ -72,6 +78,11 @@ static const struct column col_compsys[] =
{
prop_manufacturerW
,
CIM_STRING
},
{
prop_modelW
,
CIM_STRING
}
};
static
const
struct
column
col_os
[]
=
{
{
prop_captionW
,
CIM_STRING
},
{
prop_osarchitectureW
,
CIM_STRING
}
};
static
const
struct
column
col_process
[]
=
{
{
prop_captionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
...
...
@@ -99,6 +110,12 @@ static const WCHAR compsys_manufacturerW[] =
{
'T'
,
'h'
,
'e'
,
' '
,
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'P'
,
'r'
,
'o'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
static
const
WCHAR
compsys_modelW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
os_captionW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
os_32bitW
[]
=
{
'3'
,
'2'
,
'-'
,
'b'
,
'i'
,
't'
,
0
};
static
const
WCHAR
os_64bitW
[]
=
{
'6'
,
'4'
,
'-'
,
'b'
,
'i'
,
't'
,
0
};
static
const
WCHAR
processor_manufacturerW
[]
=
{
'G'
,
'e'
,
'n'
,
'u'
,
'i'
,
'n'
,
'e'
,
'I'
,
'n'
,
't'
,
'e'
,
'l'
,
0
};
...
...
@@ -116,6 +133,11 @@ struct record_computersystem
const
WCHAR
*
manufacturer
;
const
WCHAR
*
model
;
};
struct
record_operatingsystem
{
const
WCHAR
*
caption
;
const
WCHAR
*
osarchitecture
;
};
struct
record_process
{
const
WCHAR
*
caption
;
...
...
@@ -183,10 +205,31 @@ done:
CloseHandle
(
snap
);
}
static
void
fill_os
(
struct
table
*
table
)
{
struct
record_operatingsystem
*
rec
;
SYSTEM_INFO
info
;
if
(
!
(
table
->
data
=
heap_alloc
(
sizeof
(
*
rec
)
)))
return
;
rec
=
(
struct
record_operatingsystem
*
)
table
->
data
;
rec
->
caption
=
os_captionW
;
GetNativeSystemInfo
(
&
info
);
if
(
info
.
u
.
s
.
wProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_AMD64
)
rec
->
osarchitecture
=
os_64bitW
;
else
rec
->
osarchitecture
=
os_32bitW
;
TRACE
(
"created 1 row
\n
"
);
table
->
num_rows
=
1
;
}
static
struct
table
classtable
[]
=
{
{
class_biosW
,
SIZEOF
(
col_bios
),
col_bios
,
SIZEOF
(
data_bios
),
(
BYTE
*
)
data_bios
,
NULL
},
{
class_compsysW
,
SIZEOF
(
col_compsys
),
col_compsys
,
SIZEOF
(
data_compsys
),
(
BYTE
*
)
data_compsys
,
NULL
},
{
class_osW
,
SIZEOF
(
col_os
),
col_os
,
0
,
NULL
,
fill_os
},
{
class_processW
,
SIZEOF
(
col_process
),
col_process
,
0
,
NULL
,
fill_process
},
{
class_processorW
,
SIZEOF
(
col_processor
),
col_processor
,
SIZEOF
(
data_processor
),
(
BYTE
*
)
data_processor
,
NULL
}
};
...
...
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