wbemprox: Flesh out a bit SystemRestore::Enable() implementation.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d2baf148a1
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
35fb240695
commit
5bb151ebab
|
@ -45,8 +45,52 @@ HRESULT disable_restore( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
|
|||
|
||||
HRESULT enable_restore( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out )
|
||||
{
|
||||
FIXME("stub\n");
|
||||
return S_OK;
|
||||
VARIANT drive, retval;
|
||||
IWbemClassObject *sig, *out_params = NULL;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p, %p\n", in, out);
|
||||
|
||||
hr = IWbemClassObject_Get( in, L"Drive", 0, &drive, NULL, NULL );
|
||||
if (hr != S_OK) return hr;
|
||||
|
||||
hr = create_signature( L"SystemRestore", L"Enable", PARAM_OUT, &sig );
|
||||
if (hr != S_OK)
|
||||
{
|
||||
VariantClear( &drive );
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (out)
|
||||
{
|
||||
hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params );
|
||||
if (hr != S_OK)
|
||||
{
|
||||
VariantClear( &drive );
|
||||
IWbemClassObject_Release( sig );
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
FIXME("%s: stub\n", wine_dbgstr_variant(&drive));
|
||||
|
||||
VariantClear( &drive );
|
||||
IWbemClassObject_Release( sig );
|
||||
|
||||
if (out_params)
|
||||
{
|
||||
set_variant( VT_UI4, ERROR_SUCCESS, NULL, &retval );
|
||||
hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
|
||||
}
|
||||
|
||||
if (hr == S_OK && out)
|
||||
{
|
||||
*out = out_params;
|
||||
IWbemClassObject_AddRef( out_params );
|
||||
}
|
||||
if (out_params) IWbemClassObject_Release( out_params );
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT get_last_restore_status( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out )
|
||||
|
|
|
@ -1805,7 +1805,7 @@ static void test_SystemRestore( IWbemServices *services )
|
|||
out = NULL;
|
||||
hr = IWbemServices_ExecMethod( services, class, method, 0, NULL, in, &out, NULL );
|
||||
ok( hr == S_OK || hr == WBEM_E_ACCESS_DENIED, "failed to execute method %08x\n", hr );
|
||||
if (hr == S_OK && out)
|
||||
if (hr == S_OK)
|
||||
{
|
||||
VariantInit( &var );
|
||||
hr = IWbemClassObject_Get( out, L"ReturnValue", 0, &var, NULL, NULL );
|
||||
|
|
Loading…
Reference in New Issue