Module: wine Branch: master Commit: 718ca769db6045a68b0d4ba51bf74add2ac5225d URL: https://source.winehq.org/git/wine.git/?a=commit;h=718ca769db6045a68b0d4ba51...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Mar 3 09:05:51 2021 +0300
wbemprox: Prioritize ExecMethod() context over services instance one.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 );