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
773f5f8d
Commit
773f5f8d
authored
Jul 30, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add support for boolean properties.
parent
6714f16c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
query.c
dlls/wbemprox/query.c
+11
-0
table.c
dlls/wbemprox/table.c
+5
-0
No files found.
dlls/wbemprox/query.c
View file @
773f5f8d
...
...
@@ -550,6 +550,10 @@ static void set_variant( VARTYPE vartype, LONGLONG val, BSTR val_bstr, VARIANT *
{
switch
(
vartype
)
{
case
VT_BOOL
:
V_VT
(
ret
)
=
VT_BOOL
;
V_BOOL
(
ret
)
=
val
;
return
;
case
VT_BSTR
:
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
val_bstr
;
...
...
@@ -601,6 +605,9 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
switch
(
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_BOOLEAN
:
if
(
!
vartype
)
vartype
=
VT_BOOL
;
break
;
case
CIM_STRING
:
case
CIM_DATETIME
:
if
(
val
)
...
...
@@ -650,6 +657,10 @@ static HRESULT variant_to_longlong( VARIANT *var, LONGLONG *val, CIMTYPE *type )
}
switch
(
V_VT
(
var
))
{
case
VT_BOOL
:
*
val
=
V_BOOL
(
var
);
*
type
=
CIM_BOOLEAN
;
break
;
case
VT_BSTR
:
*
val
=
(
INT_PTR
)
SysAllocString
(
V_BSTR
(
var
)
);
if
(
!*
val
)
return
E_OUTOFMEMORY
;
...
...
dlls/wbemprox/table.c
View file @
773f5f8d
...
...
@@ -50,6 +50,8 @@ UINT get_type_size( CIMTYPE type )
switch
(
type
)
{
case
CIM_BOOLEAN
:
return
sizeof
(
int
);
case
CIM_SINT16
:
case
CIM_UINT16
:
return
sizeof
(
INT16
);
...
...
@@ -102,6 +104,9 @@ HRESULT get_value( const struct table *table, UINT row, UINT column, LONGLONG *v
}
switch
(
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_BOOLEAN
:
*
val
=
*
(
const
int
*
)
ptr
;
break
;
case
CIM_DATETIME
:
case
CIM_STRING
:
*
val
=
(
LONGLONG
)(
INT_PTR
)
*
(
const
WCHAR
**
)
ptr
;
...
...
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