Nikolay Sivov : wbemdisp: Forward ExecMethod_() to Services object.
Module: wine Branch: master Commit: c86ad936d05a2b53ac33ee2728807c9edc4216b6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c86ad936d05a2b53ac33ee272... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 1 10:18:31 2021 +0300 wbemdisp: Forward ExecMethod_() to Services object. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemdisp/locator.c | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index 9e191c07b49..926a4e88e63 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -1414,14 +1414,36 @@ static HRESULT WINAPI object_ReferencesAsync_( static HRESULT WINAPI object_ExecMethod_( ISWbemObject *iface, - BSTR strMethodName, - IDispatch *objWbemInParameters, - LONG iFlags, - IDispatch *objWbemNamedValueSet, - ISWbemObject **objWbemOutParameters ) + BSTR method, + IDispatch *in_params, + LONG flags, + IDispatch *valueset, + ISWbemObject **out_params ) { - FIXME( "\n" ); - return E_NOTIMPL; + struct object *object = impl_from_ISWbemObject( iface ); + VARIANT path; + HRESULT hr; + + TRACE( "%p, %s, %p, %#x, %p, %p\n", object, debugstr_w(method), in_params, flags, valueset, out_params ); + + V_VT( &path ) = VT_EMPTY; + hr = IWbemClassObject_Get( object->object, L"__PATH", 0, &path, NULL, NULL ); + if (SUCCEEDED(hr)) + { + if (V_VT( &path ) != VT_BSTR) + { + WARN( "Unexpected object path value type.\n" ); + VariantClear( &path ); + return E_UNEXPECTED; + } + + hr = ISWbemServices_ExecMethod( &object->services->ISWbemServices_iface, V_BSTR( &path ), method, + in_params, flags, valueset, out_params ); + + VariantClear( &path ); + } + + return hr; } static HRESULT WINAPI object_ExecMethodAsync_(
participants (1)
-
Alexandre Julliard