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
661d7f19
Commit
661d7f19
authored
Jun 26, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox Implement Win32_Processor.CpuStatus and Win32_Processor.DeviceId.
parent
3ebf6c8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
builtin.c
dlls/wbemprox/builtin.c
+27
-5
No files found.
dlls/wbemprox/builtin.c
View file @
661d7f19
...
@@ -59,6 +59,8 @@ static const WCHAR prop_captionW[] =
...
@@ -59,6 +59,8 @@ static const WCHAR prop_captionW[] =
{
'C'
,
'a'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'C'
,
'a'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_commandlineW
[]
=
static
const
WCHAR
prop_commandlineW
[]
=
{
'C'
,
'o'
,
'm'
,
'm'
,
'a'
,
'n'
,
'd'
,
'L'
,
'i'
,
'n'
,
'e'
,
0
};
{
'C'
,
'o'
,
'm'
,
'm'
,
'a'
,
'n'
,
'd'
,
'L'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
prop_cpustatusW
[]
=
{
'C'
,
'p'
,
'u'
,
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
static
const
WCHAR
prop_descriptionW
[]
=
static
const
WCHAR
prop_descriptionW
[]
=
{
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
{
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_deviceidW
[]
=
static
const
WCHAR
prop_deviceidW
[]
=
...
@@ -134,6 +136,8 @@ static const struct column col_process[] =
...
@@ -134,6 +136,8 @@ static const struct column col_process[] =
};
};
static
const
struct
column
col_processor
[]
=
static
const
struct
column
col_processor
[]
=
{
{
{
prop_cpustatusW
,
CIM_UINT16
},
{
prop_deviceidW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
|
COL_FLAG_KEY
},
{
prop_manufacturerW
,
CIM_STRING
}
{
prop_manufacturerW
,
CIM_STRING
}
};
};
static
const
struct
column
col_videocontroller
[]
=
static
const
struct
column
col_videocontroller
[]
=
...
@@ -208,6 +212,8 @@ struct record_process
...
@@ -208,6 +212,8 @@ struct record_process
};
};
struct
record_processor
struct
record_processor
{
{
UINT16
cpu_status
;
const
WCHAR
*
device_id
;
const
WCHAR
*
manufacturer
;
const
WCHAR
*
manufacturer
;
};
};
struct
record_videocontroller
struct
record_videocontroller
...
@@ -221,10 +227,6 @@ static const struct record_bios data_bios[] =
...
@@ -221,10 +227,6 @@ static const struct record_bios data_bios[] =
{
{
{
bios_descriptionW
,
bios_manufacturerW
,
bios_releasedateW
,
bios_serialnumberW
}
{
bios_descriptionW
,
bios_manufacturerW
,
bios_releasedateW
,
bios_serialnumberW
}
};
};
static
const
struct
record_processor
data_processor
[]
=
{
{
processor_manufacturerW
}
};
static
UINT
get_processor_count
(
void
)
static
UINT
get_processor_count
(
void
)
{
{
...
@@ -356,6 +358,26 @@ done:
...
@@ -356,6 +358,26 @@ done:
CloseHandle
(
snap
);
CloseHandle
(
snap
);
}
}
static
void
fill_processor
(
struct
table
*
table
)
{
static
const
WCHAR
fmtW
[]
=
{
'C'
,
'P'
,
'U'
,
'%'
,
'u'
,
0
};
WCHAR
device_id
[
14
];
struct
record_processor
*
rec
;
UINT
i
,
offset
=
0
,
count
=
get_processor_count
();
if
(
!
(
table
->
data
=
heap_alloc
(
sizeof
(
*
rec
)
*
count
)))
return
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
rec
=
(
struct
record_processor
*
)(
table
->
data
+
offset
);
rec
->
cpu_status
=
1
;
/* CPU Enabled */
rec
->
manufacturer
=
processor_manufacturerW
;
sprintfW
(
device_id
,
fmtW
,
i
);
rec
->
device_id
=
heap_strdupW
(
device_id
);
offset
+=
sizeof
(
*
rec
);
}
}
static
void
fill_os
(
struct
table
*
table
)
static
void
fill_os
(
struct
table
*
table
)
{
{
struct
record_operatingsystem
*
rec
;
struct
record_operatingsystem
*
rec
;
...
@@ -425,7 +447,7 @@ static struct table classtable[] =
...
@@ -425,7 +447,7 @@ static struct table classtable[] =
{
class_networkadapterW
,
SIZEOF
(
col_networkadapter
),
col_networkadapter
,
0
,
NULL
,
fill_networkadapter
},
{
class_networkadapterW
,
SIZEOF
(
col_networkadapter
),
col_networkadapter
,
0
,
NULL
,
fill_networkadapter
},
{
class_osW
,
SIZEOF
(
col_os
),
col_os
,
0
,
NULL
,
fill_os
},
{
class_osW
,
SIZEOF
(
col_os
),
col_os
,
0
,
NULL
,
fill_os
},
{
class_processW
,
SIZEOF
(
col_process
),
col_process
,
0
,
NULL
,
fill_process
},
{
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
},
{
class_processorW
,
SIZEOF
(
col_processor
),
col_processor
,
0
,
NULL
,
fill_processor
},
{
class_videocontrollerW
,
SIZEOF
(
col_videocontroller
),
col_videocontroller
,
0
,
NULL
,
fill_videocontroller
}
{
class_videocontrollerW
,
SIZEOF
(
col_videocontroller
),
col_videocontroller
,
0
,
NULL
,
fill_videocontroller
}
};
};
...
...
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