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
a26b5dc0
Commit
a26b5dc0
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 enumerating class methods.
parent
12caddb4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
8 deletions
+66
-8
class.c
dlls/wbemprox/class.c
+47
-8
table.c
dlls/wbemprox/table.c
+18
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+1
-0
No files found.
dlls/wbemprox/class.c
View file @
a26b5dc0
...
...
@@ -219,6 +219,7 @@ struct class_object
WCHAR
*
name
;
IEnumWbemClassObject
*
iter
;
UINT
index
;
UINT
index_method
;
};
static
inline
struct
class_object
*
impl_from_IWbemClassObject
(
...
...
@@ -643,8 +644,19 @@ static HRESULT WINAPI class_object_BeginMethodEnumeration(
IWbemClassObject
*
iface
,
LONG
lEnumFlags
)
{
FIXME
(
"%p, %08x
\n
"
,
iface
,
lEnumFlags
);
return
E_NOTIMPL
;
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
TRACE
(
"%p, %08x
\n
"
,
iface
,
lEnumFlags
);
if
(
lEnumFlags
)
FIXME
(
"flags 0x%08x not supported
\n
"
,
lEnumFlags
);
if
(
co
->
iter
)
{
WARN
(
"not allowed on instance
\n
"
);
return
WBEM_E_ILLEGAL_OPERATION
;
}
co
->
index_method
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
class_object_NextMethod
(
...
...
@@ -654,15 +666,41 @@ static HRESULT WINAPI class_object_NextMethod(
IWbemClassObject
**
ppInSignature
,
IWbemClassObject
**
ppOutSignature
)
{
FIXME
(
"%p, %08x, %p, %p, %p
\n
"
,
iface
,
lFlags
,
pstrName
,
ppInSignature
,
ppOutSignature
);
return
E_NOTIMPL
;
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
const
WCHAR
*
method
;
HRESULT
hr
;
TRACE
(
"%p, %08x, %p, %p, %p
\n
"
,
iface
,
lFlags
,
pstrName
,
ppInSignature
,
ppOutSignature
);
if
(
!
(
method
=
get_method_name
(
co
->
name
,
co
->
index_method
)))
return
WBEM_S_NO_MORE_DATA
;
hr
=
create_signature
(
co
->
name
,
method
,
PARAM_IN
,
ppInSignature
);
if
(
hr
!=
S_OK
)
return
hr
;
hr
=
create_signature
(
co
->
name
,
method
,
PARAM_OUT
,
ppOutSignature
);
if
(
hr
!=
S_OK
)
IWbemClassObject_Release
(
*
ppInSignature
);
else
{
if
(
!
(
*
pstrName
=
SysAllocString
(
method
)))
{
IWbemClassObject_Release
(
*
ppInSignature
);
IWbemClassObject_Release
(
*
ppOutSignature
);
return
E_OUTOFMEMORY
;
}
co
->
index_method
++
;
}
return
hr
;
}
static
HRESULT
WINAPI
class_object_EndMethodEnumeration
(
IWbemClassObject
*
iface
)
{
FIXME
(
"%p
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
class_object
*
co
=
impl_from_IWbemClassObject
(
iface
);
TRACE
(
"%p
\n
"
,
iface
);
co
->
index_method
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
class_object_GetMethodQualifierSet
(
...
...
@@ -732,8 +770,9 @@ HRESULT create_class_object(
heap_free
(
co
);
return
E_OUTOFMEMORY
;
}
co
->
iter
=
iter
;
co
->
index
=
index
;
co
->
iter
=
iter
;
co
->
index
=
index
;
co
->
index_method
=
0
;
if
(
iter
)
IEnumWbemClassObject_AddRef
(
iter
);
*
obj
=
&
co
->
IWbemClassObject_iface
;
...
...
dlls/wbemprox/table.c
View file @
a26b5dc0
...
...
@@ -331,3 +331,21 @@ BOOL add_table( struct table *table )
list_add_tail
(
table_list
,
&
table
->
entry
);
return
TRUE
;
}
const
WCHAR
*
get_method_name
(
const
WCHAR
*
class
,
UINT
index
)
{
struct
table
*
table
;
UINT
i
,
count
=
0
;
if
(
!
(
table
=
get_table
(
class
)))
return
NULL
;
for
(
i
=
0
;
i
<
table
->
num_cols
;
i
++
)
{
if
(
table
->
columns
[
i
].
type
&
COL_FLAG_METHOD
)
{
if
(
index
==
count
)
return
table
->
columns
[
i
].
name
;
count
++
;
}
}
return
NULL
;
}
dlls/wbemprox/wbemprox_private.h
View file @
a26b5dc0
...
...
@@ -151,6 +151,7 @@ HRESULT get_propval( const struct view *, UINT, const WCHAR *, VARIANT *,
HRESULT
put_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
)
DECLSPEC_HIDDEN
;
HRESULT
get_properties
(
const
struct
view
*
,
SAFEARRAY
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_object
(
const
WCHAR
*
,
IWbemClassObject
**
)
DECLSPEC_HIDDEN
;
const
WCHAR
*
get_method_name
(
const
WCHAR
*
,
UINT
)
DECLSPEC_HIDDEN
;
HRESULT
WbemLocator_create
(
IUnknown
*
,
LPVOID
*
)
DECLSPEC_HIDDEN
;
HRESULT
WbemServices_create
(
IUnknown
*
,
const
WCHAR
*
,
LPVOID
*
)
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