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
054b2606
Commit
054b2606
authored
Jan 14, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemdisp: Implement ISWbemObject::Invoke.
parent
e992df72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
10 deletions
+59
-10
locator.c
dlls/wbemdisp/locator.c
+20
-9
wbemdisp.c
dlls/wbemdisp/tests/wbemdisp.c
+39
-1
No files found.
dlls/wbemdisp/locator.c
View file @
054b2606
...
...
@@ -270,6 +270,16 @@ static HRESULT WINAPI object_GetIDsOfNames(
return
S_OK
;
}
static
BSTR
get_member_name
(
struct
object
*
object
,
DISPID
dispid
)
{
UINT
i
;
for
(
i
=
0
;
i
<
object
->
nb_members
;
i
++
)
{
if
(
object
->
members
[
i
].
dispid
==
dispid
)
return
object
->
members
[
i
].
name
;
}
return
NULL
;
}
static
HRESULT
WINAPI
object_Invoke
(
ISWbemObject
*
iface
,
DISPID
member
,
...
...
@@ -282,20 +292,21 @@ static HRESULT WINAPI object_Invoke(
UINT
*
arg_err
)
{
struct
object
*
object
=
impl_from_ISWbemObject
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
BSTR
name
;
TRACE
(
"%p, %
d, %s, %d, %d
, %p, %p, %p, %p
\n
"
,
object
,
member
,
debugstr_guid
(
riid
),
TRACE
(
"%p, %
x, %s, %u, %x
, %p, %p, %p, %p
\n
"
,
object
,
member
,
debugstr_guid
(
riid
),
lcid
,
flags
,
params
,
result
,
excep_info
,
arg_err
);
hr
=
get_typeinfo
(
ISWbemObject_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
if
(
flags
!=
(
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
&
object
->
ISWbemObject_iface
,
member
,
flags
,
params
,
result
,
excep_info
,
arg_err
);
ITypeInfo_Release
(
typeinfo
);
FIXME
(
"flags %x not supported
\n
"
,
flags
);
return
E_NOTIMPL
;
}
return
hr
;
if
(
!
(
name
=
get_member_name
(
object
,
member
)))
return
DISP_E_MEMBERNOTFOUND
;
memset
(
params
,
0
,
sizeof
(
*
params
)
);
return
IWbemClassObject_Get
(
object
->
object
,
name
,
0
,
result
,
NULL
,
NULL
);
}
static
HRESULT
WINAPI
object_Put_
(
...
...
dlls/wbemdisp/tests/wbemdisp.c
View file @
054b2606
...
...
@@ -130,10 +130,12 @@ static void test_ParseDisplayName(void)
if
(
enumvar
)
{
VARIANT
var
;
VARIANT
var
,
res
;
ULONG
fetched
;
IDispatch
*
dispatch
=
NULL
;
DISPID
dispid
;
DISPPARAMS
params
;
UINT
arg_err
;
fetched
=
0xdeadbeef
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
0
,
&
var
,
&
fetched
);
...
...
@@ -183,6 +185,42 @@ static void test_ParseDisplayName(void)
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
dispid
==
0x1800001
||
dispid
==
0x10b
/* win2k */
,
"got %x
\n
"
,
dispid
);
if
(
dispid
==
0x1800001
)
/* crashes on win2k */
{
V_VT
(
&
res
)
=
VT_ERROR
;
V_BSTR
(
&
res
)
=
(
BSTR
)
0xdeadbeef
;
params
.
rgvarg
=
(
VARIANTARG
*
)
0xdeadbeef
;
params
.
rgdispidNamedArgs
=
(
DISPID
*
)
0xdeadbeef
;
params
.
cArgs
=
params
.
cNamedArgs
=
0xdeadbeef
;
arg_err
=
0xdeadbeef
;
hr
=
IDispatch_Invoke
(
dispatch
,
DISPID_UNKNOWN
,
&
IID_NULL
,
english
,
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
,
&
params
,
&
res
,
NULL
,
&
arg_err
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
||
hr
==
S_OK
/* winxp */
,
"got %x
\n
"
,
hr
);
ok
(
params
.
rgvarg
==
(
VARIANTARG
*
)
0xdeadbeef
,
"got %p
\n
"
,
params
.
rgvarg
);
ok
(
params
.
rgdispidNamedArgs
==
(
DISPID
*
)
0xdeadbeef
,
"got %p
\n
"
,
params
.
rgdispidNamedArgs
);
ok
(
params
.
cArgs
==
0xdeadbeef
,
"got %u
\n
"
,
params
.
cArgs
);
ok
(
params
.
cNamedArgs
==
0xdeadbeef
,
"got %u
\n
"
,
params
.
cNamedArgs
);
ok
(
V_VT
(
&
res
)
==
VT_ERROR
,
"got %u
\n
"
,
V_VT
(
&
res
)
);
ok
(
V_ERROR
(
&
res
)
==
0xdeadbeef
,
"got %u
\n
"
,
V_VT
(
&
res
)
);
ok
(
arg_err
==
0xdeadbeef
,
"got %u
\n
"
,
arg_err
);
if
(
hr
==
S_OK
)
VariantClear
(
&
res
);
}
V_VT
(
&
res
)
=
VT_ERROR
;
V_BSTR
(
&
res
)
=
(
BSTR
)
0xdeadbeef
;
memset
(
&
params
,
0
,
sizeof
(
params
)
);
hr
=
IDispatch_Invoke
(
dispatch
,
dispid
,
&
IID_NULL
,
english
,
DISPATCH_METHOD
|
DISPATCH_PROPERTYGET
,
&
params
,
&
res
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
params
.
rgvarg
==
NULL
,
"got %p
\n
"
,
params
.
rgvarg
);
ok
(
params
.
rgdispidNamedArgs
==
NULL
,
"got %p
\n
"
,
params
.
rgdispidNamedArgs
);
ok
(
!
params
.
cArgs
,
"got %u
\n
"
,
params
.
cArgs
);
ok
(
!
params
.
cNamedArgs
,
"got %u
\n
"
,
params
.
cNamedArgs
);
ok
(
V_VT
(
&
res
)
==
VT_BSTR
,
"got %u
\n
"
,
V_VT
(
&
res
)
);
ok
(
V_BSTR
(
&
res
)
!=
(
BSTR
)
0xdeadbeef
,
"got %u
\n
"
,
V_VT
(
&
res
)
);
VariantClear
(
&
res
);
VariantClear
(
&
var
);
fetched
=
0xdeadbeef
;
...
...
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