2 * SystemRestore implementation
4 * Copyright 2020 Dmitry Timoshkov
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 #include "wbemprox_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(wbemprox
);
34 HRESULT
sysrestore_create( IWbemClassObject
*obj
, IWbemContext
*context
, IWbemClassObject
*in
, IWbemClassObject
**out
)
40 HRESULT
sysrestore_disable( IWbemClassObject
*obj
, IWbemContext
*context
, IWbemClassObject
*in
, IWbemClassObject
**out
)
46 HRESULT
sysrestore_enable( IWbemClassObject
*obj
, IWbemContext
*context
, IWbemClassObject
*in
, IWbemClassObject
**out
)
48 VARIANT drive
, retval
;
49 IWbemClassObject
*sig
, *out_params
= NULL
;
52 TRACE("%p, %p, %p, %p\n", obj
, context
, in
, out
);
54 hr
= IWbemClassObject_Get( in
, L
"Drive", 0, &drive
, NULL
, NULL
);
55 if (hr
!= S_OK
) return hr
;
57 hr
= create_signature( L
"SystemRestore", L
"Enable", PARAM_OUT
, &sig
);
60 VariantClear( &drive
);
66 hr
= IWbemClassObject_SpawnInstance( sig
, 0, &out_params
);
69 VariantClear( &drive
);
70 IWbemClassObject_Release( sig
);
75 FIXME("%s: stub\n", wine_dbgstr_variant(&drive
));
77 VariantClear( &drive
);
78 IWbemClassObject_Release( sig
);
82 set_variant( VT_UI4
, ERROR_SUCCESS
, NULL
, &retval
);
83 hr
= IWbemClassObject_Put( out_params
, L
"ReturnValue", 0, &retval
, CIM_UINT32
);
86 if (hr
== S_OK
&& out
)
89 IWbemClassObject_AddRef( out_params
);
91 if (out_params
) IWbemClassObject_Release( out_params
);
96 HRESULT
sysrestore_get_last_status( IWbemClassObject
*obj
, IWbemContext
*context
, IWbemClassObject
*in
, IWbemClassObject
**out
)
102 HRESULT
sysrestore_restore( IWbemClassObject
*obj
, IWbemContext
*context
, IWbemClassObject
*in
, IWbemClassObject
**out
)