Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wbemdisp/locator.c | 194 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 191 insertions(+), 3 deletions(-)
diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index 1d61c423a91..9cea78cdf71 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -49,6 +49,7 @@ enum type_id ISWbemSecurity_tid, ISWbemNamedValueSet_tid, ISWbemNamedValue_tid, + ISWbemMethodSet_tid, last_tid };
@@ -66,6 +67,7 @@ static REFIID wbemdisp_tid_id[] = &IID_ISWbemSecurity, &IID_ISWbemNamedValueSet, &IID_ISWbemNamedValue, + &IID_ISWbemMethodSet, };
static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret ) @@ -500,6 +502,190 @@ static HRESULT SWbemPropertySet_create( IWbemClassObject *wbem_object, ISWbemPro return S_OK; }
+struct methodset +{ + ISWbemMethodSet ISWbemMethodSet_iface; + LONG refs; +}; + +static struct methodset *impl_from_ISWbemMethodSet( ISWbemMethodSet *iface ) +{ + return CONTAINING_RECORD( iface, struct methodset, ISWbemMethodSet_iface ); +} + +static HRESULT WINAPI methodset_QueryInterface( ISWbemMethodSet *iface, REFIID riid, void **ppvObject ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + + TRACE( "%p %s %p\n", set, debugstr_guid(riid), ppvObject ); + + if (IsEqualGUID( riid, &IID_ISWbemMethodSet ) || + IsEqualGUID( riid, &IID_IDispatch ) || + IsEqualGUID( riid, &IID_IUnknown )) + { + *ppvObject = iface; + } + else + { + FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); + return E_NOINTERFACE; + } + ISWbemMethodSet_AddRef( iface ); + return S_OK; +} + +static ULONG WINAPI methodset_AddRef( ISWbemMethodSet *iface ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + return InterlockedIncrement( &set->refs ); +} + +static ULONG WINAPI methodset_Release( ISWbemMethodSet *iface ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + LONG refs = InterlockedDecrement( &set->refs ); + if (!refs) + { + TRACE( "destroying %p\n", set ); + heap_free( set ); + } + return refs; +} + +static HRESULT WINAPI methodset_GetTypeInfoCount( + ISWbemMethodSet *iface, + UINT *count ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + + TRACE( "%p, %p\n", set, count ); + *count = 1; + return S_OK; +} + +static HRESULT WINAPI methodset_GetTypeInfo( ISWbemMethodSet *iface, + UINT index, + LCID lcid, + ITypeInfo **info ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + + TRACE( "%p, %u, %u, %p\n", set, index, lcid, info ); + + return get_typeinfo( ISWbemMethodSet_tid, info ); +} + +static HRESULT WINAPI methodset_GetIDsOfNames( + ISWbemMethodSet *iface, + REFIID riid, + LPOLESTR *names, + UINT count, + LCID lcid, + DISPID *dispid ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE( "%p, %s, %p, %u, %u, %p\n", set, debugstr_guid(riid), names, count, lcid, dispid ); + + if (!names || !count || !dispid) return E_INVALIDARG; + + hr = get_typeinfo( ISWbemMethodSet_tid, &typeinfo ); + if (SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid ); + ITypeInfo_Release( typeinfo ); + } + return hr; +} + +static HRESULT WINAPI methodset_Invoke( + ISWbemMethodSet *iface, + DISPID member, + REFIID riid, + LCID lcid, + WORD flags, + DISPPARAMS *params, + VARIANT *result, + EXCEPINFO *excep_info, + UINT *arg_err ) +{ + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", set, member, debugstr_guid(riid), + lcid, flags, params, result, excep_info, arg_err ); + + hr = get_typeinfo( ISWbemMethodSet_tid, &typeinfo ); + if (SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke( typeinfo, &set->ISWbemMethodSet_iface, member, flags, + params, result, excep_info, arg_err ); + ITypeInfo_Release( typeinfo ); + } + return hr; +} + +static HRESULT WINAPI methodset_get__NewEnum( + ISWbemMethodSet *iface, + IUnknown **unk ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static HRESULT WINAPI methodset_Item( + ISWbemMethodSet *iface, + BSTR name, + LONG flags, + ISWbemMethod **method ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static HRESULT WINAPI methodset_get_Count( + ISWbemMethodSet *iface, + LONG *count ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static const ISWbemMethodSetVtbl methodsetvtbl = +{ + methodset_QueryInterface, + methodset_AddRef, + methodset_Release, + methodset_GetTypeInfoCount, + methodset_GetTypeInfo, + methodset_GetIDsOfNames, + methodset_Invoke, + methodset_get__NewEnum, + methodset_Item, + methodset_get_Count, +}; + +static HRESULT SWbemMethodSet_create( ISWbemMethodSet **obj ) +{ + struct methodset *set; + + if (!(set = heap_alloc(sizeof(*set)))) + return E_OUTOFMEMORY; + + set->ISWbemMethodSet_iface.lpVtbl = &methodsetvtbl; + set->refs = 1; + + *obj = &set->ISWbemMethodSet_iface; + + return S_OK; +} + #define DISPID_BASE 0x1800000 #define DISPID_BASE_METHOD 0x1000000
@@ -1027,10 +1213,12 @@ static HRESULT WINAPI object_get_Properties_( ISWbemObject *iface, ISWbemPropert
static HRESULT WINAPI object_get_Methods_( ISWbemObject *iface, - ISWbemMethodSet **objWbemMethodSet ) + ISWbemMethodSet **set ) { - FIXME( "\n" ); - return E_NOTIMPL; + struct object *object = impl_from_ISWbemObject( iface ); + + TRACE( "%p, %p\n", object, set ); + return SWbemMethodSet_create( set ); }
static HRESULT WINAPI object_get_Derivation_(
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wbemdisp/locator.c | 270 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 248 insertions(+), 22 deletions(-)
diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index 9cea78cdf71..a73bd6e55da 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -50,6 +50,7 @@ enum type_id ISWbemNamedValueSet_tid, ISWbemNamedValue_tid, ISWbemMethodSet_tid, + ISWbemMethod_tid, last_tid };
@@ -68,6 +69,7 @@ static REFIID wbemdisp_tid_id[] = &IID_ISWbemNamedValueSet, &IID_ISWbemNamedValue, &IID_ISWbemMethodSet, + &IID_ISWbemMethod, };
static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret ) @@ -502,10 +504,232 @@ static HRESULT SWbemPropertySet_create( IWbemClassObject *wbem_object, ISWbemPro return S_OK; }
+struct member +{ + BSTR name; + BOOL is_method; + DISPID dispid; +}; + +struct object +{ + ISWbemObject ISWbemObject_iface; + LONG refs; + IWbemClassObject *object; + struct member *members; + UINT nb_members; + DISPID last_dispid; + DISPID last_dispid_method; +}; + +struct method +{ + ISWbemMethod ISWbemMethod_iface; + LONG refs; +}; + +static struct method *impl_from_ISWbemMethod( ISWbemMethod *iface ) +{ + return CONTAINING_RECORD( iface, struct method, ISWbemMethod_iface ); +} + +static HRESULT WINAPI method_QueryInterface( ISWbemMethod *iface, REFIID riid, void **ppvObject ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + + TRACE( "%p %s %p\n", method, debugstr_guid(riid), ppvObject ); + + if (IsEqualGUID( riid, &IID_ISWbemMethod ) || + IsEqualGUID( riid, &IID_IDispatch ) || + IsEqualGUID( riid, &IID_IUnknown )) + { + *ppvObject = iface; + } + else + { + FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); + return E_NOINTERFACE; + } + ISWbemMethod_AddRef( iface ); + return S_OK; +} + +static ULONG WINAPI method_AddRef( ISWbemMethod *iface ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + return InterlockedIncrement( &method->refs ); +} + +static ULONG WINAPI method_Release( ISWbemMethod *iface ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + LONG refs = InterlockedDecrement( &method->refs ); + if (!refs) + { + TRACE( "destroying %p\n", method ); + heap_free( method ); + } + return refs; +} + +static HRESULT WINAPI method_GetTypeInfoCount( + ISWbemMethod *iface, + UINT *count ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + + TRACE( "%p, %p\n", method, count ); + *count = 1; + return S_OK; +} + +static HRESULT WINAPI method_GetTypeInfo( + ISWbemMethod *iface, + UINT index, + LCID lcid, + ITypeInfo **info ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + + TRACE( "%p, %u, %u, %p\n", method, index, lcid, info ); + + return get_typeinfo( ISWbemMethod_tid, info ); +} + +static HRESULT WINAPI method_GetIDsOfNames( + ISWbemMethod *iface, + REFIID riid, + LPOLESTR *names, + UINT count, + LCID lcid, + DISPID *dispid ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE( "%p, %s, %p, %u, %u, %p\n", method, debugstr_guid(riid), names, count, lcid, dispid ); + + if (!names || !count || !dispid) return E_INVALIDARG; + + hr = get_typeinfo( ISWbemMethod_tid, &typeinfo ); + if (SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid ); + ITypeInfo_Release( typeinfo ); + } + return hr; +} + +static HRESULT WINAPI method_Invoke( + ISWbemMethod *iface, + DISPID member, + REFIID riid, + LCID lcid, + WORD flags, + DISPPARAMS *params, + VARIANT *result, + EXCEPINFO *excep_info, + UINT *arg_err ) +{ + struct method *method = impl_from_ISWbemMethod( iface ); + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", method, member, debugstr_guid(riid), + lcid, flags, params, result, excep_info, arg_err ); + + hr = get_typeinfo( ISWbemMethod_tid, &typeinfo ); + if (SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke( typeinfo, &method->ISWbemMethod_iface, member, flags, + params, result, excep_info, arg_err ); + ITypeInfo_Release( typeinfo ); + } + return hr; +} + +static HRESULT WINAPI method_get_Name( + ISWbemMethod *iface, + BSTR *name ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static HRESULT WINAPI method_get_Origin( + ISWbemMethod *iface, + BSTR *origin ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static HRESULT WINAPI method_get_InParameters( + ISWbemMethod *iface, + ISWbemObject **params ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static HRESULT WINAPI method_get_OutParameters( + ISWbemMethod *iface, + ISWbemObject **params ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static HRESULT WINAPI method_get_Qualifiers_( + ISWbemMethod *iface, + ISWbemQualifierSet **qualifiers ) +{ + FIXME("\n"); + + return E_NOTIMPL; +} + +static const ISWbemMethodVtbl methodvtbl = +{ + method_QueryInterface, + method_AddRef, + method_Release, + method_GetTypeInfoCount, + method_GetTypeInfo, + method_GetIDsOfNames, + method_Invoke, + method_get_Name, + method_get_Origin, + method_get_InParameters, + method_get_OutParameters, + method_get_Qualifiers_, +}; + +static HRESULT SWbemMethod_create( ISWbemMethod **obj ) +{ + struct method *method; + + if (!(method = heap_alloc(sizeof(*method)))) + return E_OUTOFMEMORY; + + method->ISWbemMethod_iface.lpVtbl = &methodvtbl; + method->refs = 1; + + *obj = &method->ISWbemMethod_iface; + + return S_OK; +} + struct methodset { ISWbemMethodSet ISWbemMethodSet_iface; LONG refs; + struct object *object; };
static struct methodset *impl_from_ISWbemMethodSet( ISWbemMethodSet *iface ) @@ -547,6 +771,7 @@ static ULONG WINAPI methodset_Release( ISWbemMethodSet *iface ) if (!refs) { TRACE( "destroying %p\n", set ); + ISWbemObject_Release( &set->object->ISWbemObject_iface ); heap_free( set ); } return refs; @@ -643,9 +868,26 @@ static HRESULT WINAPI methodset_Item( LONG flags, ISWbemMethod **method ) { - FIXME("\n"); + struct methodset *set = impl_from_ISWbemMethodSet( iface ); + IWbemClassObject *in_sign, *out_sign; + HRESULT hr;
- return E_NOTIMPL; + TRACE("%p, %s, %#x, %p\n", set, debugstr_w(name), flags, method); + + *method = NULL; + + if (SUCCEEDED(hr = IWbemClassObject_GetMethod( set->object->object, + name, flags, &in_sign, &out_sign ))) + { + if (in_sign) + IWbemClassObject_Release( in_sign ); + if (out_sign) + IWbemClassObject_Release( out_sign ); + + return SWbemMethod_create( method ); + } + + return hr; }
static HRESULT WINAPI methodset_get_Count( @@ -671,7 +913,7 @@ static const ISWbemMethodSetVtbl methodsetvtbl = methodset_get_Count, };
-static HRESULT SWbemMethodSet_create( ISWbemMethodSet **obj ) +static HRESULT SWbemMethodSet_create( struct object *object, ISWbemMethodSet **obj ) { struct methodset *set;
@@ -680,6 +922,8 @@ static HRESULT SWbemMethodSet_create( ISWbemMethodSet **obj )
set->ISWbemMethodSet_iface.lpVtbl = &methodsetvtbl; set->refs = 1; + set->object = object; + ISWbemObject_AddRef( &object->ISWbemObject_iface );
*obj = &set->ISWbemMethodSet_iface;
@@ -689,24 +933,6 @@ static HRESULT SWbemMethodSet_create( ISWbemMethodSet **obj ) #define DISPID_BASE 0x1800000 #define DISPID_BASE_METHOD 0x1000000
-struct member -{ - BSTR name; - BOOL is_method; - DISPID dispid; -}; - -struct object -{ - ISWbemObject ISWbemObject_iface; - LONG refs; - IWbemClassObject *object; - struct member *members; - UINT nb_members; - DISPID last_dispid; - DISPID last_dispid_method; -}; - static inline struct object *impl_from_ISWbemObject( ISWbemObject *iface ) { @@ -1218,7 +1444,7 @@ static HRESULT WINAPI object_get_Methods_( struct object *object = impl_from_ISWbemObject( iface );
TRACE( "%p, %p\n", object, set ); - return SWbemMethodSet_create( set ); + return SWbemMethodSet_create( object, set ); }
static HRESULT WINAPI object_get_Derivation_(
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wbemprox/class.c | 12 ++++++++++-- dlls/wbemprox/tests/query.c | 10 ++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index d24d8cbb5ca..f48c815ef8d 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -674,13 +674,21 @@ static HRESULT WINAPI class_object_SpawnInstance( struct class_object *co = impl_from_IWbemClassObject( iface ); struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); struct table *table = get_view_table( ec->query->view, co->index ); + IEnumWbemClassObject *iter; struct record *record; + HRESULT hr;
TRACE("%p, %08x, %p\n", iface, lFlags, ppNewInstance);
if (!(record = create_record( table ))) return E_OUTOFMEMORY; - - return create_class_object( co->name, NULL, 0, record, ppNewInstance ); + if (FAILED(hr = IEnumWbemClassObject_Clone( co->iter, &iter ))) + { + destroy_record( record ); + return hr; + } + hr = create_class_object( co->name, iter, 0, record, ppNewInstance ); + IEnumWbemClassObject_Release( iter ); + return hr; }
static HRESULT WINAPI class_object_CompareTo( diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index b5de00b5dec..f650418e51f 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -753,6 +753,16 @@ static void test_StdRegProv( IWbemServices *services ) hr = IWbemClassObject_SpawnInstance( sig_in, 0, &in ); ok( hr == S_OK, "failed to spawn instance %08x\n", hr );
+ hr = IWbemClassObject_BeginEnumeration( in, 0 ); + ok( hr == S_OK, "failed to start enumeration %08x\n", hr ); + + hr = IWbemClassObject_Next( in, 0, &name, NULL, NULL, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + SysFreeString( name ); + + hr = IWbemClassObject_EndEnumeration( in ); + ok( hr == S_OK, "failed to end enumeration %08x\n", hr ); + V_VT( &defkey ) = VT_I4; V_I4( &defkey ) = 0x80000001; hr = IWbemClassObject_Put( in, L"hDefKey", 0, &defkey, 0 );
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wbemdisp/locator.c | 60 +++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 11 deletions(-)
diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index a73bd6e55da..d7b04e343fd 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -35,8 +35,17 @@
WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp);
+static WCHAR *heap_strdupW( const WCHAR *src ) +{ + WCHAR *dst; + if (!src) return NULL; + if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src ); + return dst; +} + static HRESULT EnumVARIANT_create( IEnumWbemClassObject *, IEnumVARIANT ** ); static HRESULT ISWbemSecurity_create( ISWbemSecurity ** ); +static HRESULT SWbemObject_create( IWbemClassObject *, ISWbemObject ** );
enum type_id { @@ -522,10 +531,19 @@ struct object DISPID last_dispid_method; };
+struct methodset +{ + ISWbemMethodSet ISWbemMethodSet_iface; + LONG refs; + struct object *object; +}; + struct method { ISWbemMethod ISWbemMethod_iface; LONG refs; + struct methodset *set; + WCHAR *name; };
static struct method *impl_from_ISWbemMethod( ISWbemMethod *iface ) @@ -567,6 +585,8 @@ static ULONG WINAPI method_Release( ISWbemMethod *iface ) if (!refs) { TRACE( "destroying %p\n", method ); + ISWbemMethodSet_Release( &method->set->ISWbemMethodSet_iface ); + heap_free( method->name ); heap_free( method ); } return refs; @@ -671,9 +691,27 @@ static HRESULT WINAPI method_get_InParameters( ISWbemMethod *iface, ISWbemObject **params ) { - FIXME("\n"); + struct method *method = impl_from_ISWbemMethod( iface ); + IWbemClassObject *in_sign = NULL, *instance; + HRESULT hr;
- return E_NOTIMPL; + TRACE("%p, %p\n", method, params); + + *params = NULL; + + if (SUCCEEDED(hr = IWbemClassObject_GetMethod( method->set->object->object, + method->name, 0, &in_sign, NULL )) && in_sign != NULL) + { + hr = IWbemClassObject_SpawnInstance( in_sign, 0, &instance ); + IWbemClassObject_Release( in_sign ); + if (SUCCEEDED(hr)) + { + hr = SWbemObject_create( instance, params ); + IWbemClassObject_Release( instance ); + } + } + + return hr; }
static HRESULT WINAPI method_get_OutParameters( @@ -710,7 +748,7 @@ static const ISWbemMethodVtbl methodvtbl = method_get_Qualifiers_, };
-static HRESULT SWbemMethod_create( ISWbemMethod **obj ) +static HRESULT SWbemMethod_create( struct methodset *set, const WCHAR *name, ISWbemMethod **obj ) { struct method *method;
@@ -719,19 +757,19 @@ static HRESULT SWbemMethod_create( ISWbemMethod **obj )
method->ISWbemMethod_iface.lpVtbl = &methodvtbl; method->refs = 1; + method->set = set; + ISWbemMethodSet_AddRef( &method->set->ISWbemMethodSet_iface ); + if (!(method->name = heap_strdupW( name ))) + { + ISWbemMethod_Release( &method->ISWbemMethod_iface ); + return E_OUTOFMEMORY; + }
*obj = &method->ISWbemMethod_iface;
return S_OK; }
-struct methodset -{ - ISWbemMethodSet ISWbemMethodSet_iface; - LONG refs; - struct object *object; -}; - static struct methodset *impl_from_ISWbemMethodSet( ISWbemMethodSet *iface ) { return CONTAINING_RECORD( iface, struct methodset, ISWbemMethodSet_iface ); @@ -884,7 +922,7 @@ static HRESULT WINAPI methodset_Item( if (out_sign) IWbemClassObject_Release( out_sign );
- return SWbemMethod_create( method ); + return SWbemMethod_create( set, name, method ); }
return hr;
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wbemdisp/locator.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c index d7b04e343fd..619f7e5c67f 100644 --- a/dlls/wbemdisp/locator.c +++ b/dlls/wbemdisp/locator.c @@ -1226,16 +1226,28 @@ static HRESULT WINAPI object_Invoke( return hr; }
- if (flags != (DISPATCH_METHOD|DISPATCH_PROPERTYGET)) + if (!(name = get_member_name( object, member ))) + return DISP_E_MEMBERNOTFOUND; + + if (flags == (DISPATCH_METHOD|DISPATCH_PROPERTYGET)) + { + memset( params, 0, sizeof(*params) ); + return IWbemClassObject_Get( object->object, name, 0, result, NULL, NULL ); + } + else if (flags == DISPATCH_PROPERTYPUT) + { + if (!params->cArgs || !params->rgvarg) + { + WARN( "Missing put property value\n" ); + return E_INVALIDARG; + } + return IWbemClassObject_Put( object->object, name, 0, params->rgvarg, 0 ); + } + else { FIXME( "flags %x not supported\n", flags ); return E_NOTIMPL; } - 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_(
Signed-off-by: Hans Leidekker hans@codeweavers.com