wbemprox: Pass an object instance to class methods.
This commit is contained in:
parent
003355946f
commit
755e01bc98
|
@ -121,7 +121,7 @@ static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, VARIANT
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT reg_enum_key( IWbemClassObject *in, IWbemClassObject **out )
|
||||
HRESULT reg_enum_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out )
|
||||
{
|
||||
VARIANT defkey, subkey, names, retval;
|
||||
IWbemClassObject *sig;
|
||||
|
@ -219,7 +219,7 @@ done:
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT reg_enum_values( IWbemClassObject *in, IWbemClassObject **out )
|
||||
HRESULT reg_enum_values( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out )
|
||||
{
|
||||
VARIANT defkey, subkey, names, types, retval;
|
||||
IWbemClassObject *sig;
|
||||
|
@ -291,7 +291,7 @@ done:
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT reg_get_stringvalue( IWbemClassObject *in, IWbemClassObject **out )
|
||||
HRESULT reg_get_stringvalue( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out )
|
||||
{
|
||||
VARIANT defkey, subkey, name, value, retval;
|
||||
IWbemClassObject *sig;
|
||||
|
|
|
@ -578,6 +578,7 @@ static HRESULT WINAPI wbem_services_ExecMethod(
|
|||
IWbemClassObject **ppOutParams,
|
||||
IWbemCallResult **ppCallResult )
|
||||
{
|
||||
IWbemClassObject *obj;
|
||||
struct table *table;
|
||||
class_method *func;
|
||||
struct path *path;
|
||||
|
@ -588,16 +589,29 @@ static HRESULT WINAPI wbem_services_ExecMethod(
|
|||
|
||||
if (lFlags) FIXME("flags %08x not supported\n", lFlags);
|
||||
|
||||
if ((hr = parse_path( strObjectPath, &path )) != S_OK) return hr;
|
||||
|
||||
if ((hr = get_object( strObjectPath, &obj ))) return hr;
|
||||
if ((hr = parse_path( strObjectPath, &path )) != S_OK)
|
||||
{
|
||||
IWbemClassObject_Release( obj );
|
||||
return hr;
|
||||
}
|
||||
table = grab_table( path->class );
|
||||
free_path( path );
|
||||
if (!table) return WBEM_E_NOT_FOUND;
|
||||
|
||||
if (!table)
|
||||
{
|
||||
IWbemClassObject_Release( obj );
|
||||
return WBEM_E_NOT_FOUND;
|
||||
}
|
||||
hr = get_method( table, strMethodName, &func );
|
||||
release_table( table );
|
||||
if (hr != S_OK) return hr;
|
||||
return func( pInParams, ppOutParams );
|
||||
if (hr != S_OK)
|
||||
{
|
||||
IWbemClassObject_Release( obj );
|
||||
return hr;
|
||||
}
|
||||
hr = func( obj, pInParams, ppOutParams );
|
||||
IWbemClassObject_Release( obj );
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI wbem_services_ExecMethodAsync(
|
||||
|
|
|
@ -38,7 +38,7 @@ enum param_direction
|
|||
#define COL_FLAG_KEY 0x00020000
|
||||
#define COL_FLAG_METHOD 0x00040000
|
||||
|
||||
typedef HRESULT (class_method)(IWbemClassObject *, IWbemClassObject **);
|
||||
typedef HRESULT (class_method)(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **);
|
||||
|
||||
struct column
|
||||
{
|
||||
|
@ -196,9 +196,9 @@ HRESULT create_class_object(const WCHAR *, IEnumWbemClassObject *, UINT,
|
|||
struct record *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
HRESULT EnumWbemClassObject_create(IUnknown *, struct query *, LPVOID *) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT reg_enum_key(IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
HRESULT reg_enum_values(IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
HRESULT reg_get_stringvalue(IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
HRESULT reg_enum_key(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
HRESULT reg_enum_values(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
HRESULT reg_get_stringvalue(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN;
|
||||
|
||||
static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
|
||||
static inline void *heap_alloc( size_t len )
|
||||
|
|
Loading…
Reference in New Issue