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
99a3ad06
Commit
99a3ad06
authored
Sep 28, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement IWbemServices::ExecMethod.
parent
c36045db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
services.c
dlls/wbemprox/services.c
+18
-2
table.c
dlls/wbemprox/table.c
+23
-0
wbemprox_private.h
dlls/wbemprox/wbemprox_private.h
+1
-0
No files found.
dlls/wbemprox/services.c
View file @
99a3ad06
...
...
@@ -579,8 +579,24 @@ static HRESULT WINAPI wbem_services_ExecMethod(
IWbemClassObject
**
ppOutParams
,
IWbemCallResult
**
ppCallResult
)
{
FIXME
(
"
\n
"
);
return
WBEM_E_FAILED
;
const
struct
table
*
table
;
class_method
*
func
;
struct
path
*
path
;
HRESULT
hr
;
TRACE
(
"%p, %s, %s, %08x, %p, %p, %p, %p
\n
"
,
iface
,
debugstr_w
(
strObjectPath
),
debugstr_w
(
strMethodName
),
lFlags
,
pCtx
,
pInParams
,
ppOutParams
,
ppCallResult
);
if
(
lFlags
)
FIXME
(
"flags %08x not supported
\n
"
,
lFlags
);
if
((
hr
=
parse_path
(
strObjectPath
,
&
path
))
!=
S_OK
)
return
hr
;
table
=
get_table
(
path
->
class
);
free_path
(
path
);
if
(
!
table
)
return
WBEM_E_NOT_FOUND
;
if
((
hr
=
get_method
(
table
,
strMethodName
,
&
func
))
!=
S_OK
)
return
hr
;
return
func
(
pInParams
,
ppOutParams
);
}
static
HRESULT
WINAPI
wbem_services_ExecMethodAsync
(
...
...
dlls/wbemprox/table.c
View file @
99a3ad06
...
...
@@ -239,6 +239,29 @@ HRESULT set_value( const struct table *table, UINT row, UINT column, LONGLONG va
return
S_OK
;
}
HRESULT
get_method
(
const
struct
table
*
table
,
const
WCHAR
*
name
,
class_method
**
func
)
{
UINT
i
,
j
;
for
(
i
=
0
;
i
<
table
->
num_rows
;
i
++
)
{
for
(
j
=
0
;
j
<
table
->
num_cols
;
j
++
)
{
if
(
table
->
columns
[
j
].
type
&
COL_FLAG_METHOD
&&
!
strcmpW
(
table
->
columns
[
j
].
name
,
name
))
{
HRESULT
hr
;
LONGLONG
val
;
if
((
hr
=
get_value
(
table
,
i
,
j
,
&
val
))
!=
S_OK
)
return
hr
;
*
func
=
(
class_method
*
)(
INT_PTR
)
val
;
return
S_OK
;
}
}
}
return
WBEM_E_INVALID_METHOD
;
}
static
void
clear_table
(
struct
table
*
table
)
{
UINT
i
,
j
,
type
;
...
...
dlls/wbemprox/wbemprox_private.h
View file @
99a3ad06
...
...
@@ -162,6 +162,7 @@ HRESULT get_column_index( const struct table *, const WCHAR *, UINT * ) DECLSPEC
HRESULT
get_value
(
const
struct
table
*
,
UINT
,
UINT
,
LONGLONG
*
)
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
get_method
(
const
struct
table
*
,
const
WCHAR
*
,
class_method
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
*
,
LONG
*
)
DECLSPEC_HIDDEN
;
HRESULT
put_propval
(
const
struct
view
*
,
UINT
,
const
WCHAR
*
,
VARIANT
*
,
CIMTYPE
)
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