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
8343aed4
Commit
8343aed4
authored
Apr 30, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Return selected properties only from IWbemClassObject::Next.
parent
c9abb27d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
39 deletions
+22
-39
class.c
dlls/wbemprox/class.c
+18
-11
query.c
dlls/wbemprox/query.c
+2
-2
table.c
dlls/wbemprox/table.c
+0
-25
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+2
-1
No files found.
dlls/wbemprox/class.c
View file @
8343aed4
...
@@ -511,23 +511,30 @@ static HRESULT WINAPI class_object_Next(
...
@@ -511,23 +511,30 @@ static HRESULT WINAPI class_object_Next(
CIMTYPE
*
pType
,
CIMTYPE
*
pType
,
LONG
*
plFlavor
)
LONG
*
plFlavor
)
{
{
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
struct
class_object
*
obj
=
impl_from_IWbemClassObject
(
iface
);
struct
enum_class_object
*
ec
=
impl_from_IEnumWbemClassObject
(
co
->
iter
);
struct
enum_class_object
*
iter
=
impl_from_IEnumWbemClassObject
(
obj
->
iter
);
struct
view
*
view
=
ec
->
query
->
view
;
struct
view
*
view
=
iter
->
query
->
view
;
BSTR
prop
erty
;
BSTR
prop
;
HRESULT
hr
;
HRESULT
hr
;
UINT
i
;
TRACE
(
"%p, %08x, %p, %p, %p, %p
\n
"
,
iface
,
lFlags
,
strName
,
pVal
,
pType
,
plFlavor
);
TRACE
(
"%p, %08x, %p, %p, %p, %p
\n
"
,
iface
,
lFlags
,
strName
,
pVal
,
pType
,
plFlavor
);
if
(
!
(
property
=
get_property_name
(
co
->
name
,
co
->
index_property
)))
return
WBEM_S_NO_MORE_DATA
;
for
(
i
=
obj
->
index_property
;
i
<
view
->
table
->
num_cols
;
i
++
)
if
((
hr
=
get_propval
(
view
,
co
->
index
,
property
,
pVal
,
pType
,
plFlavor
)
!=
S_OK
))
{
{
SysFreeString
(
property
);
if
(
is_method
(
view
->
table
,
i
))
continue
;
return
hr
;
if
(
!
is_selected_prop
(
view
,
view
->
table
->
columns
[
i
].
name
))
continue
;
if
(
!
(
prop
=
SysAllocString
(
view
->
table
->
columns
[
i
].
name
)))
return
E_OUTOFMEMORY
;
if
((
hr
=
get_propval
(
view
,
obj
->
index
,
prop
,
pVal
,
pType
,
plFlavor
))
!=
S_OK
)
{
SysFreeString
(
prop
);
return
hr
;
}
obj
->
index_property
=
i
+
1
;
*
strName
=
prop
;
return
S_OK
;
}
}
*
strName
=
property
;
return
WBEM_S_NO_MORE_DATA
;
co
->
index_property
++
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
class_object_EndEnumeration
(
static
HRESULT
WINAPI
class_object_EndEnumeration
(
...
...
dlls/wbemprox/query.c
View file @
8343aed4
...
@@ -424,7 +424,7 @@ done:
...
@@ -424,7 +424,7 @@ done:
return
hr
;
return
hr
;
}
}
static
BOOL
is_selected_prop
(
const
struct
view
*
view
,
const
WCHAR
*
name
)
BOOL
is_selected_prop
(
const
struct
view
*
view
,
const
WCHAR
*
name
)
{
{
const
struct
property
*
prop
=
view
->
proplist
;
const
struct
property
*
prop
=
view
->
proplist
;
...
@@ -563,7 +563,7 @@ done:
...
@@ -563,7 +563,7 @@ done:
return
ret
;
return
ret
;
}
}
static
inline
BOOL
is_method
(
const
struct
table
*
table
,
UINT
column
)
BOOL
is_method
(
const
struct
table
*
table
,
UINT
column
)
{
{
return
table
->
columns
[
column
].
type
&
COL_FLAG_METHOD
;
return
table
->
columns
[
column
].
type
&
COL_FLAG_METHOD
;
}
}
...
...
dlls/wbemprox/table.c
View file @
8343aed4
...
@@ -406,28 +406,3 @@ BSTR get_method_name( const WCHAR *class, UINT index )
...
@@ -406,28 +406,3 @@ BSTR get_method_name( const WCHAR *class, UINT index )
release_table
(
table
);
release_table
(
table
);
return
NULL
;
return
NULL
;
}
}
BSTR
get_property_name
(
const
WCHAR
*
class
,
UINT
index
)
{
struct
table
*
table
;
UINT
i
,
count
=
0
;
BSTR
ret
;
if
(
!
(
table
=
grab_table
(
class
)))
return
NULL
;
for
(
i
=
0
;
i
<
table
->
num_cols
;
i
++
)
{
if
(
!
(
table
->
columns
[
i
].
type
&
COL_FLAG_METHOD
))
{
if
(
index
==
count
)
{
ret
=
SysAllocString
(
table
->
columns
[
i
].
name
);
release_table
(
table
);
return
ret
;
}
count
++
;
}
}
release_table
(
table
);
return
NULL
;
}
dlls/wbemprox/wbemprox_private.h
View file @
8343aed4
...
@@ -192,6 +192,7 @@ HRESULT get_column_index( const struct table *, const WCHAR *, UINT * ) DECLSPEC
...
@@ -192,6 +192,7 @@ HRESULT get_column_index( const struct table *, const WCHAR *, UINT * ) DECLSPEC
HRESULT
get_value
(
const
struct
table
*
,
UINT
,
UINT
,
LONGLONG
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_value
(
const
struct
table
*
,
UINT
,
UINT
,
LONGLONG
*
)
DECLSPEC_HIDDEN
;
BSTR
get_value_bstr
(
const
struct
table
*
,
UINT
,
UINT
)
DECLSPEC_HIDDEN
;
BSTR
get_value_bstr
(
const
struct
table
*
,
UINT
,
UINT
)
DECLSPEC_HIDDEN
;
HRESULT
set_value
(
const
struct
table
*
,
UINT
,
UINT
,
LONGLONG
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
HRESULT
set_value
(
const
struct
table
*
,
UINT
,
UINT
,
LONGLONG
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
BOOL
is_method
(
const
struct
table
*
,
UINT
)
DECLSPEC_HIDDEN
;
HRESULT
get_method
(
const
struct
table
*
,
const
WCHAR
*
,
class_method
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_method
(
const
struct
table
*
,
const
WCHAR
*
,
class_method
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
CIMTYPE
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
...
@@ -200,10 +201,10 @@ HRESULT to_longlong( VARIANT *, LONGLONG *, CIMTYPE * ) DECLSPEC_HIDDEN;
...
@@ -200,10 +201,10 @@ HRESULT to_longlong( VARIANT *, LONGLONG *, CIMTYPE * ) DECLSPEC_HIDDEN;
SAFEARRAY
*
to_safearray
(
const
struct
array
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
SAFEARRAY
*
to_safearray
(
const
struct
array
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
VARTYPE
to_vartype
(
CIMTYPE
)
DECLSPEC_HIDDEN
;
VARTYPE
to_vartype
(
CIMTYPE
)
DECLSPEC_HIDDEN
;
void
destroy_array
(
struct
array
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
void
destroy_array
(
struct
array
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
BOOL
is_selected_prop
(
const
struct
view
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_properties
(
const
struct
view
*
,
LONG
,
SAFEARRAY
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_properties
(
const
struct
view
*
,
LONG
,
SAFEARRAY
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_object
(
const
WCHAR
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_object
(
const
WCHAR
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
BSTR
get_method_name
(
const
WCHAR
*
,
UINT
)
DECLSPEC_HIDDEN
;
BSTR
get_method_name
(
const
WCHAR
*
,
UINT
)
DECLSPEC_HIDDEN
;
BSTR
get_property_name
(
const
WCHAR
*
,
UINT
)
DECLSPEC_HIDDEN
;
void
set_variant
(
VARTYPE
,
LONGLONG
,
void
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
void
set_variant
(
VARTYPE
,
LONGLONG
,
void
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_signature
(
const
WCHAR
*
,
const
WCHAR
*
,
enum
param_direction
,
HRESULT
create_signature
(
const
WCHAR
*
,
const
WCHAR
*
,
enum
param_direction
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
...
...
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