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
fe79fea7
Commit
fe79fea7
authored
Jun 29, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Fix returned variant type and flavor for system properties.
parent
1b0d5cb1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
14 deletions
+31
-14
class.c
dlls/wbemprox/class.c
+1
-6
query.c
dlls/wbemprox/query.c
+11
-7
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+1
-1
wbemcli.idl
include/wbemcli.idl
+18
-0
No files found.
dlls/wbemprox/class.c
View file @
fe79fea7
...
...
@@ -290,12 +290,7 @@ static HRESULT WINAPI class_object_Get(
TRACE
(
"%p, %s, %08x, %p, %p, %p
\n
"
,
iface
,
debugstr_w
(
wszName
),
lFlags
,
pVal
,
pType
,
plFlavor
);
if
(
plFlavor
)
{
FIXME
(
"flavor parameter not supported
\n
"
);
*
plFlavor
=
0
;
}
return
get_propval
(
view
,
co
->
index
,
wszName
,
pVal
,
pType
);
return
get_propval
(
view
,
co
->
index
,
wszName
,
pVal
,
pType
,
plFlavor
);
}
static
HRESULT
WINAPI
class_object_Put
(
...
...
dlls/wbemprox/query.c
View file @
fe79fea7
...
...
@@ -597,7 +597,7 @@ static UINT count_selected_props( const struct view *view )
}
static
HRESULT
get_system_propval
(
const
struct
view
*
view
,
UINT
index
,
const
WCHAR
*
name
,
VARIANT
*
ret
,
CIMTYPE
*
type
)
VARIANT
*
ret
,
CIMTYPE
*
type
,
LONG
*
flavor
)
{
static
const
WCHAR
classW
[]
=
{
'_'
,
'_'
,
'C'
,
'L'
,
'A'
,
'S'
,
'S'
,
0
};
static
const
WCHAR
genusW
[]
=
{
'_'
,
'_'
,
'G'
,
'E'
,
'N'
,
'U'
,
'S'
,
0
};
...
...
@@ -607,6 +607,8 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
static
const
WCHAR
relpathW
[]
=
{
'_'
,
'_'
,
'R'
,
'E'
,
'L'
,
'P'
,
'A'
,
'T'
,
'H'
,
0
};
static
const
WCHAR
serverW
[]
=
{
'_'
,
'_'
,
'S'
,
'E'
,
'R'
,
'V'
,
'E'
,
'R'
,
0
};
if
(
flavor
)
*
flavor
=
WBEM_FLAVOR_ORIGIN_SYSTEM
;
if
(
!
strcmpiW
(
name
,
classW
))
{
V_VT
(
ret
)
=
VT_BSTR
;
...
...
@@ -616,8 +618,8 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
}
if
(
!
strcmpiW
(
name
,
genusW
))
{
V_VT
(
ret
)
=
VT_I
NT
;
V_I
NT
(
ret
)
=
WBEM_GENUS_INSTANCE
;
/* FIXME */
V_VT
(
ret
)
=
VT_I
4
;
V_I
4
(
ret
)
=
WBEM_GENUS_INSTANCE
;
/* FIXME */
if
(
type
)
*
type
=
CIM_SINT32
;
return
S_OK
;
}
...
...
@@ -637,8 +639,8 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
}
if
(
!
strcmpiW
(
name
,
propcountW
))
{
V_VT
(
ret
)
=
VT_I
NT
;
V_I
NT
(
ret
)
=
count_selected_props
(
view
);
V_VT
(
ret
)
=
VT_I
4
;
V_I
4
(
ret
)
=
count_selected_props
(
view
);
if
(
type
)
*
type
=
CIM_SINT32
;
return
S_OK
;
}
...
...
@@ -660,13 +662,14 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
return
WBEM_E_NOT_FOUND
;
}
HRESULT
get_propval
(
const
struct
view
*
view
,
UINT
index
,
const
WCHAR
*
name
,
VARIANT
*
ret
,
CIMTYPE
*
type
)
HRESULT
get_propval
(
const
struct
view
*
view
,
UINT
index
,
const
WCHAR
*
name
,
VARIANT
*
ret
,
CIMTYPE
*
type
,
LONG
*
flavor
)
{
HRESULT
hr
;
UINT
column
,
row
=
view
->
result
[
index
];
LONGLONG
val
;
if
(
is_system_prop
(
name
))
return
get_system_propval
(
view
,
index
,
name
,
ret
,
type
);
if
(
is_system_prop
(
name
))
return
get_system_propval
(
view
,
index
,
name
,
ret
,
type
,
flavor
);
if
(
!
is_selected_prop
(
view
,
name
))
return
WBEM_E_NOT_FOUND
;
hr
=
get_column_index
(
view
->
table
,
name
,
&
column
);
...
...
@@ -711,6 +714,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
return
WBEM_E_FAILED
;
}
if
(
type
)
*
type
=
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
;
if
(
flavor
)
*
flavor
=
0
;
return
S_OK
;
}
...
...
dlls/wbemprox/wbemprox_private.h
View file @
fe79fea7
...
...
@@ -120,7 +120,7 @@ HRESULT create_view( const struct property *, const WCHAR *, const struct expr *
void
destroy_view
(
struct
view
*
)
DECLSPEC_HIDDEN
;
struct
table
*
get_table
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
*
)
DECLSPEC_HIDDEN
;
CIMTYPE
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_properties
(
const
struct
view
*
,
SAFEARRAY
**
)
DECLSPEC_HIDDEN
;
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
...
...
include/wbemcli.idl
View file @
fe79fea7
...
...
@@ -201,6 +201,24 @@ typedef [v1_enum] enum tag_WBEM_CONDITION_FLAG_TYPE
WBEM_MASK_CLASS_CONDITION
=
0
x300
}
WBEM_CONDITION_FLAG_TYPE
;
typedef
[
v1_enum
]
enum
tag_WBEM_FLAVOR_TYPE
{
WBEM_FLAVOR_DONT_PROPAGATE
=
0
,
WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE
=
0
x1
,
WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS
=
0
x2
,
WBEM_FLAVOR_MASK_PROPAGATION
=
0
xf
,
WBEM_FLAVOR_OVERRIDABLE
=
0
,
WBEM_FLAVOR_NOT_OVERRIDABLE
=
0
x10
,
WBEM_FLAVOR_MASK_PERMISSIONS
=
0
x10
,
WBEM_FLAVOR_ORIGIN_LOCAL
=
0
,
WBEM_FLAVOR_ORIGIN_PROPAGATED
=
0
x20
,
WBEM_FLAVOR_ORIGIN_SYSTEM
=
0
x40
,
WBEM_FLAVOR_MASK_ORIGIN
=
0
x60
,
WBEM_FLAVOR_NOT_AMENDED
=
0
,
WBEM_FLAVOR_AMENDED
=
0
x80
,
WBEM_FLAVOR_MASK_AMENDED
=
0
x80
}
WBEM_FLAVOR_TYPE
;
typedef
[
v1_enum
]
enum
tag_WBEM_GENUS_TYPE
{
WBEM_GENUS_CLASS
=
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