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
9e748591
Commit
9e748591
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: Support mixed dynamic and static table data.
parent
bb48585d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
builtin.c
dlls/wbemprox/builtin.c
+2
-2
query.c
dlls/wbemprox/query.c
+11
-10
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+4
-1
No files found.
dlls/wbemprox/builtin.c
View file @
9e748591
...
...
@@ -74,8 +74,8 @@ static const struct column col_compsys[] =
};
static
const
struct
column
col_process
[]
=
{
{
prop_captionW
,
CIM_STRING
},
{
prop_descriptionW
,
CIM_STRING
},
{
prop_captionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_descriptionW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_pprocessidW
,
CIM_UINT32
},
{
prop_processidW
,
CIM_UINT32
},
{
prop_threadcountW
,
CIM_UINT32
}
...
...
dlls/wbemprox/query.c
View file @
9e748591
...
...
@@ -48,7 +48,7 @@ static UINT get_column_size( const struct table *table, UINT column )
{
if
(
table
->
columns
[
column
].
type
&
CIM_FLAG_ARRAY
)
return
sizeof
(
void
*
);
switch
(
table
->
columns
[
column
].
type
)
switch
(
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_SINT16
:
case
CIM_UINT16
:
...
...
@@ -60,7 +60,7 @@ static UINT get_column_size( const struct table *table, UINT column )
case
CIM_STRING
:
return
sizeof
(
WCHAR
*
);
default:
ERR
(
"unkown column type %u
\n
"
,
table
->
columns
[
column
].
type
);
ERR
(
"unkown column type %u
\n
"
,
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
);
break
;
}
return
sizeof
(
INT32
);
...
...
@@ -92,7 +92,7 @@ static HRESULT get_value( const struct table *table, UINT row, UINT column, INT_
*
val
=
(
INT_PTR
)
*
(
const
void
**
)
ptr
;
return
S_OK
;
}
switch
(
table
->
columns
[
column
].
type
)
switch
(
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_DATETIME
:
case
CIM_STRING
:
...
...
@@ -111,7 +111,7 @@ static HRESULT get_value( const struct table *table, UINT row, UINT column, INT_
*
val
=
*
(
const
UINT32
*
)
ptr
;
break
;
default:
ERR
(
"invalid column type %u
\n
"
,
table
->
columns
[
column
].
type
);
ERR
(
"invalid column type %u
\n
"
,
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
);
*
val
=
0
;
break
;
}
...
...
@@ -136,7 +136,7 @@ HRESULT create_view( const struct property *proplist, const WCHAR *class,
static
void
clear_table
(
struct
table
*
table
)
{
UINT
i
,
j
;
UINT
i
,
j
,
type
;
if
(
!
table
->
fill
||
!
table
->
data
)
return
;
...
...
@@ -144,9 +144,10 @@ static void clear_table( struct table *table )
{
for
(
j
=
0
;
j
<
table
->
num_cols
;
j
++
)
{
if
(
table
->
columns
[
j
].
type
==
CIM_STRING
||
table
->
columns
[
j
].
type
==
CIM_DATETIME
||
(
table
->
columns
[
j
].
type
&
CIM_FLAG_ARRAY
))
if
(
!
(
table
->
columns
[
j
].
type
&
COL_FLAG_DYNAMIC
))
continue
;
type
=
table
->
columns
[
j
].
type
&
COL_TYPE_MASK
;
if
(
type
==
CIM_STRING
||
type
==
CIM_DATETIME
||
(
type
&
CIM_FLAG_ARRAY
))
{
void
*
ptr
;
if
(
get_value
(
table
,
i
,
j
,
(
INT_PTR
*
)
&
ptr
)
==
S_OK
)
heap_free
(
ptr
);
...
...
@@ -399,7 +400,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
hr
=
get_value
(
view
->
table
,
row
,
column
,
&
val
);
if
(
hr
!=
S_OK
)
return
hr
;
switch
(
view
->
table
->
columns
[
column
].
type
)
switch
(
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_STRING
:
case
CIM_DATETIME
:
...
...
@@ -410,7 +411,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
ERR
(
"unhandled column type %u
\n
"
,
view
->
table
->
columns
[
column
].
type
);
return
WBEM_E_FAILED
;
}
if
(
type
)
*
type
=
view
->
table
->
columns
[
column
].
type
;
if
(
type
)
*
type
=
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
;
return
S_OK
;
}
...
...
dlls/wbemprox/wbemprox_private.h
View file @
9e748591
...
...
@@ -21,10 +21,13 @@
#define SIZEOF(array) (sizeof(array)/sizeof((array)[0]))
#define COL_TYPE_MASK 0x0000ffff
#define COL_FLAG_DYNAMIC 0x00010000
struct
column
{
const
WCHAR
*
name
;
CIMTYPE_ENUMERATION
type
;
UINT
type
;
};
struct
table
...
...
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