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
8f0da0ea
Commit
8f0da0ea
authored
Jun 28, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement more properties of Win32_VideoController.
parent
581c705c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
7 deletions
+45
-7
Makefile.in
dlls/wbemprox/Makefile.in
+1
-1
builtin.c
dlls/wbemprox/builtin.c
+44
-6
No files found.
dlls/wbemprox/Makefile.in
View file @
8f0da0ea
MODULE
=
wbemprox.dll
IMPORTS
=
iphlpapi dxgi oleaut32 ole32 advapi32 user32
IMPORTS
=
iphlpapi dxgi oleaut32 ole32 advapi32 user32
gdi32
C_SRCS
=
\
builtin.c
\
...
...
dlls/wbemprox/builtin.c
View file @
8f0da0ea
...
...
@@ -63,6 +63,12 @@ static const WCHAR prop_commandlineW[] =
{
'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_currentbitsperpixelW
[]
=
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'B'
,
'i'
,
't'
,
's'
,
'P'
,
'e'
,
'r'
,
'P'
,
'i'
,
'x'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
prop_currenthorizontalresW
[]
=
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'H'
,
'o'
,
'r'
,
'i'
,
'z'
,
'o'
,
'n'
,
't'
,
'a'
,
'l'
,
'R'
,
'e'
,
's'
,
'o'
,
'l'
,
'u'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_currentverticalresW
[]
=
{
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
't'
,
'i'
,
'c'
,
'a'
,
'l'
,
'R'
,
'e'
,
's'
,
'o'
,
'l'
,
'u'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_descriptionW
[]
=
{
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
prop_deviceidW
[]
=
...
...
@@ -75,6 +81,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_nameW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
prop_netconnectionstatusW
[]
=
{
'N'
,
'e'
,
't'
,
'C'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
static
const
WCHAR
prop_numlogicalprocessorsW
[]
=
...
...
@@ -152,8 +160,12 @@ static const struct column col_processor[] =
};
static
const
struct
column
col_videocontroller
[]
=
{
{
prop_adapterramW
,
CIM_UINT32
},
{
prop_deviceidW
,
CIM_STRING
|
COL_FLAG_KEY
}
{
prop_adapterramW
,
CIM_UINT32
},
{
prop_currentbitsperpixelW
,
CIM_UINT32
},
{
prop_currenthorizontalresW
,
CIM_UINT32
},
{
prop_currentverticalresW
,
CIM_UINT32
},
{
prop_deviceidW
,
CIM_STRING
|
COL_FLAG_KEY
},
{
prop_nameW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
}
};
static
const
WCHAR
bios_descriptionW
[]
=
...
...
@@ -235,7 +247,11 @@ struct record_processor
struct
record_videocontroller
{
UINT32
adapter_ram
;
UINT32
current_bitsperpixel
;
UINT32
current_horizontalres
;
UINT32
current_verticalres
;
const
WCHAR
*
device_id
;
const
WCHAR
*
name
;
};
#include "poppack.h"
...
...
@@ -438,6 +454,19 @@ static void fill_os( struct table *table )
table
->
num_rows
=
1
;
}
static
UINT32
get_bits_per_pixel
(
UINT
*
hres
,
UINT
*
vres
)
{
HDC
hdc
=
GetDC
(
NULL
);
UINT32
ret
;
if
(
!
hdc
)
return
32
;
ret
=
GetDeviceCaps
(
hdc
,
BITSPIXEL
);
*
hres
=
GetDeviceCaps
(
hdc
,
HORZRES
);
*
vres
=
GetDeviceCaps
(
hdc
,
VERTRES
);
ReleaseDC
(
NULL
,
hdc
);
return
ret
;
}
static
void
fill_videocontroller
(
struct
table
*
table
)
{
...
...
@@ -446,7 +475,8 @@ static void fill_videocontroller( struct table *table )
IDXGIFactory
*
factory
=
NULL
;
IDXGIAdapter
*
adapter
=
NULL
;
DXGI_ADAPTER_DESC
desc
;
UINT
vidmem
=
512
*
1024
*
1024
;
UINT
hres
=
1024
,
vres
=
768
,
vidmem
=
512
*
1024
*
1024
;
const
WCHAR
*
name
=
videocontroller_deviceidW
;
if
(
!
(
table
->
data
=
heap_alloc
(
sizeof
(
*
rec
)
)))
return
;
...
...
@@ -457,12 +487,20 @@ static void fill_videocontroller( struct table *table )
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IDXGIAdapter_GetDesc
(
adapter
,
&
desc
);
if
(
SUCCEEDED
(
hr
))
vidmem
=
desc
.
DedicatedVideoMemory
;
if
(
SUCCEEDED
(
hr
))
{
vidmem
=
desc
.
DedicatedVideoMemory
;
name
=
desc
.
Description
;
}
done:
rec
=
(
struct
record_videocontroller
*
)
table
->
data
;
rec
->
device_id
=
videocontroller_deviceidW
;
rec
->
adapter_ram
=
vidmem
;
rec
->
adapter_ram
=
vidmem
;
rec
->
current_bitsperpixel
=
get_bits_per_pixel
(
&
hres
,
&
vres
);
rec
->
current_horizontalres
=
hres
;
rec
->
current_verticalres
=
vres
;
rec
->
device_id
=
videocontroller_deviceidW
;
rec
->
name
=
heap_strdupW
(
name
);
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