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
b37eb06b
Commit
b37eb06b
authored
Jul 05, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Add support for CIM_REFERENCE.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
691fcebf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
class.c
dlls/wbemprox/class.c
+6
-3
query.c
dlls/wbemprox/query.c
+2
-0
table.c
dlls/wbemprox/table.c
+5
-1
No files found.
dlls/wbemprox/class.c
View file @
b37eb06b
...
...
@@ -238,7 +238,7 @@ void destroy_array( struct array *array, CIMTYPE type )
UINT
i
,
size
;
if
(
!
array
)
return
;
if
(
type
==
CIM_STRING
||
type
==
CIM_DATETIME
)
if
(
type
==
CIM_STRING
||
type
==
CIM_DATETIME
||
type
==
CIM_REFERENCE
)
{
size
=
get_type_size
(
type
);
for
(
i
=
0
;
i
<
array
->
count
;
i
++
)
heap_free
(
*
(
WCHAR
**
)((
char
*
)
array
->
ptr
+
i
*
size
)
);
...
...
@@ -255,8 +255,9 @@ static void destroy_record( struct record *record )
release_table
(
record
->
table
);
for
(
i
=
0
;
i
<
record
->
count
;
i
++
)
{
if
(
record
->
fields
[
i
].
type
==
CIM_STRING
||
record
->
fields
[
i
].
type
==
CIM_DATETIME
)
heap_free
(
record
->
fields
[
i
].
u
.
sval
);
if
(
record
->
fields
[
i
].
type
==
CIM_STRING
||
record
->
fields
[
i
].
type
==
CIM_DATETIME
||
record
->
fields
[
i
].
type
==
CIM_REFERENCE
)
heap_free
(
record
->
fields
[
i
].
u
.
sval
);
else
if
(
record
->
fields
[
i
].
type
&
CIM_FLAG_ARRAY
)
destroy_array
(
record
->
fields
[
i
].
u
.
aval
,
record
->
fields
[
i
].
type
&
CIM_TYPE_MASK
);
}
...
...
@@ -357,6 +358,7 @@ static HRESULT record_get_value( const struct record *record, UINT index, VARIAN
{
case
CIM_STRING
:
case
CIM_DATETIME
:
case
CIM_REFERENCE
:
if
(
!
vartype
)
vartype
=
VT_BSTR
;
V_BSTR
(
var
)
=
SysAllocString
(
record
->
fields
[
index
].
u
.
sval
);
break
;
...
...
@@ -418,6 +420,7 @@ static HRESULT record_set_value( struct record *record, UINT index, VARIANT *var
{
case
CIM_STRING
:
case
CIM_DATETIME
:
case
CIM_REFERENCE
:
record
->
fields
[
index
].
u
.
sval
=
(
WCHAR
*
)(
INT_PTR
)
val
;
return
S_OK
;
case
CIM_SINT16
:
...
...
dlls/wbemprox/query.c
View file @
b37eb06b
...
...
@@ -745,6 +745,7 @@ VARTYPE to_vartype( CIMTYPE type )
{
case
CIM_BOOLEAN
:
return
VT_BOOL
;
case
CIM_STRING
:
case
CIM_REFERENCE
:
case
CIM_DATETIME
:
return
VT_BSTR
;
case
CIM_SINT8
:
return
VT_I1
;
case
CIM_UINT8
:
return
VT_UI1
;
...
...
@@ -878,6 +879,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
if
(
!
vartype
)
vartype
=
VT_BOOL
;
break
;
case
CIM_STRING
:
case
CIM_REFERENCE
:
case
CIM_DATETIME
:
if
(
val
)
{
...
...
dlls/wbemprox/table.c
View file @
b37eb06b
...
...
@@ -64,6 +64,7 @@ UINT get_type_size( CIMTYPE type )
case
CIM_UINT64
:
return
sizeof
(
INT64
);
case
CIM_DATETIME
:
case
CIM_REFERENCE
:
case
CIM_STRING
:
return
sizeof
(
WCHAR
*
);
default:
...
...
@@ -110,6 +111,7 @@ HRESULT get_value( const struct table *table, UINT row, UINT column, LONGLONG *v
*
val
=
*
(
const
int
*
)
ptr
;
break
;
case
CIM_DATETIME
:
case
CIM_REFERENCE
:
case
CIM_STRING
:
*
val
=
(
INT_PTR
)
*
(
const
WCHAR
**
)
ptr
;
break
;
...
...
@@ -173,6 +175,7 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
else
return
SysAllocString
(
falseW
);
case
CIM_DATETIME
:
case
CIM_REFERENCE
:
case
CIM_STRING
:
if
(
!
val
)
return
NULL
;
len
=
lstrlenW
(
(
const
WCHAR
*
)(
INT_PTR
)
val
)
+
2
;
...
...
@@ -220,6 +223,7 @@ HRESULT set_value( const struct table *table, UINT row, UINT column, LONGLONG va
switch
(
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_DATETIME
:
case
CIM_REFERENCE
:
case
CIM_STRING
:
*
(
WCHAR
**
)
ptr
=
(
WCHAR
*
)(
INT_PTR
)
val
;
break
;
...
...
@@ -287,7 +291,7 @@ void free_row_values( const struct table *table, UINT row )
if
(
!
(
table
->
columns
[
i
].
type
&
COL_FLAG_DYNAMIC
))
continue
;
type
=
table
->
columns
[
i
].
type
&
COL_TYPE_MASK
;
if
(
type
==
CIM_STRING
||
type
==
CIM_DATETIME
)
if
(
type
==
CIM_STRING
||
type
==
CIM_DATETIME
||
type
==
CIM_REFERENCE
)
{
if
(
get_value
(
table
,
row
,
i
,
&
val
)
==
S_OK
)
heap_free
(
(
void
*
)(
INT_PTR
)
val
);
}
...
...
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