Commit d2baf148 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

wbemprox: Flesh out a bit SystemRestore::Enable() implementation.

parent e0cb4d50
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment