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
492a9653
Commit
492a9653
authored
Oct 09, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Make name and value optional in IWbemClassObject::Next.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a9c6ff23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
19 deletions
+49
-19
class.c
dlls/wbemprox/class.c
+4
-1
query.c
dlls/wbemprox/query.c
+43
-18
query.c
dlls/wbemprox/tests/query.c
+2
-0
No files found.
dlls/wbemprox/class.c
View file @
492a9653
...
...
@@ -532,8 +532,11 @@ static HRESULT WINAPI class_object_Next(
SysFreeString
(
prop
);
return
hr
;
}
obj
->
index_property
=
i
+
1
;
*
strName
=
prop
;
if
(
strName
)
*
strName
=
prop
;
else
SysFreeString
(
prop
);
return
S_OK
;
}
return
WBEM_S_NO_MORE_DATA
;
...
...
dlls/wbemprox/query.c
View file @
492a9653
...
...
@@ -668,50 +668,71 @@ static HRESULT get_system_propval( const struct view *view, UINT index, const WC
if
(
!
strcmpiW
(
name
,
classW
))
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_classname
(
view
);
if
(
ret
)
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_classname
(
view
);
}
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
if
(
!
strcmpiW
(
name
,
genusW
))
{
V_VT
(
ret
)
=
VT_I4
;
V_I4
(
ret
)
=
WBEM_GENUS_INSTANCE
;
/* FIXME */
if
(
ret
)
{
V_VT
(
ret
)
=
VT_I4
;
V_I4
(
ret
)
=
WBEM_GENUS_INSTANCE
;
/* FIXME */
}
if
(
type
)
*
type
=
CIM_SINT32
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
namespaceW
))
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_namespace
(
view
);
if
(
ret
)
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_namespace
(
view
);
}
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
pathW
))
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_path
(
view
,
index
,
name
);
if
(
ret
)
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_path
(
view
,
index
,
name
);
}
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
if
(
!
strcmpiW
(
name
,
propcountW
))
{
V_VT
(
ret
)
=
VT_I4
;
V_I4
(
ret
)
=
count_selected_properties
(
view
);
if
(
ret
)
{
V_VT
(
ret
)
=
VT_I4
;
V_I4
(
ret
)
=
count_selected_properties
(
view
);
}
if
(
type
)
*
type
=
CIM_SINT32
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
relpathW
))
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_relpath
(
view
,
index
,
name
);
if
(
ret
)
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_relpath
(
view
,
index
,
name
);
}
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
else
if
(
!
strcmpiW
(
name
,
serverW
))
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_servername
(
view
);
if
(
ret
)
{
V_VT
(
ret
)
=
VT_BSTR
;
V_BSTR
(
ret
)
=
build_servername
(
view
);
}
if
(
type
)
*
type
=
CIM_STRING
;
return
S_OK
;
}
...
...
@@ -835,6 +856,11 @@ 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
;
if
(
type
)
*
type
=
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
;
if
(
flavor
)
*
flavor
=
0
;
if
(
!
ret
)
return
S_OK
;
vartype
=
view
->
table
->
columns
[
column
].
vartype
;
if
(
view
->
table
->
columns
[
column
].
type
&
CIM_FLAG_ARRAY
)
{
...
...
@@ -843,8 +869,10 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
val_ptr
=
to_safearray
(
(
const
struct
array
*
)(
INT_PTR
)
val
,
basetype
);
if
(
!
val_ptr
)
vartype
=
VT_NULL
;
else
if
(
!
vartype
)
vartype
=
to_vartype
(
basetype
)
|
VT_ARRAY
;
goto
done
;
set_variant
(
vartype
,
val
,
val_ptr
,
ret
);
return
S_OK
;
}
switch
(
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
)
{
case
CIM_BOOLEAN
:
...
...
@@ -891,10 +919,7 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
return
WBEM_E_FAILED
;
}
done:
set_variant
(
vartype
,
val
,
val_ptr
,
ret
);
if
(
type
)
*
type
=
view
->
table
->
columns
[
column
].
type
&
COL_TYPE_MASK
;
if
(
flavor
)
*
flavor
=
0
;
return
S_OK
;
}
...
...
dlls/wbemprox/tests/query.c
View file @
492a9653
...
...
@@ -1194,6 +1194,8 @@ static void test_Win32_OperatingSystem( IWbemServices *services )
hr
=
IWbemClassObject_BeginEnumeration
(
obj
,
0
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
while
(
IWbemClassObject_Next
(
obj
,
0
,
NULL
,
NULL
,
NULL
,
NULL
)
==
S_OK
)
{}
hr
=
IWbemClassObject_EndEnumeration
(
obj
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
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