From 718ca769db6045a68b0d4ba51bf74add2ac5225d Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 3 Mar 2021 09:05:51 +0300 Subject: [PATCH] wbemprox: Prioritize ExecMethod() context over services instance one. Signed-off-by: Nikolay Sivov Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/wbemprox/services.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c index 5275dd348c7..faed31b79af 100644 --- a/dlls/wbemprox/services.c +++ b/dlls/wbemprox/services.c @@ -836,11 +836,12 @@ static HRESULT WINAPI wbem_services_ExecMethod( const BSTR strObjectPath, const BSTR strMethodName, LONG lFlags, - IWbemContext *pCtx, + IWbemContext *context, IWbemClassObject *pInParams, IWbemClassObject **ppOutParams, IWbemCallResult **ppCallResult ) { + struct wbem_services *services = impl_from_IWbemServices( iface ); IEnumWbemClassObject *result = NULL; IWbemClassObject *obj = NULL; struct query *query = NULL; @@ -851,7 +852,7 @@ static HRESULT WINAPI wbem_services_ExecMethod( HRESULT hr; TRACE("%p, %s, %s, %08x, %p, %p, %p, %p\n", iface, debugstr_w(strObjectPath), - debugstr_w(strMethodName), lFlags, pCtx, pInParams, ppOutParams, ppCallResult); + debugstr_w(strMethodName), lFlags, context, pInParams, ppOutParams, ppCallResult); if (lFlags) FIXME("flags %08x not supported\n", lFlags); @@ -882,7 +883,7 @@ static HRESULT WINAPI wbem_services_ExecMethod( hr = get_method( table, strMethodName, &func ); if (hr != S_OK) goto done; - hr = func( obj, NULL, pInParams, ppOutParams ); + hr = func( obj, context ? context : services->context, pInParams, ppOutParams ); done: if (result) IEnumWbemClassObject_Release( result );