Sync with trunk r62754.
[reactos.git] / dll / win32 / wuapi / updates.c
index 0366ebc..dad6ac1 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define COBJMACROS
-
-#include "config.h"
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "ole2.h"
-#include "wuapi.h"
-
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
+#include "wuapi_private.h"
 
 typedef struct _automatic_updates
 {
-    const struct IAutomaticUpdatesVtbl *vtbl;
+    IAutomaticUpdates IAutomaticUpdates_iface;
     LONG refs;
 } automatic_updates;
 
 static inline automatic_updates *impl_from_IAutomaticUpdates( IAutomaticUpdates *iface )
 {
-    return (automatic_updates *)((char*)iface - FIELD_OFFSET( automatic_updates, vtbl ));
+    return CONTAINING_RECORD(iface, automatic_updates, IAutomaticUpdates_iface);
 }
 
 static ULONG WINAPI automatic_updates_AddRef(
@@ -151,7 +138,7 @@ static HRESULT WINAPI automatic_updates_Resume(
     IAutomaticUpdates *This )
 {
     FIXME("\n");
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 static HRESULT WINAPI automatic_updates_ShowSettingsDialog(
@@ -211,10 +198,10 @@ HRESULT AutomaticUpdates_create( IUnknown *pUnkOuter, LPVOID *ppObj )
     updates = HeapAlloc( GetProcessHeap(), 0, sizeof(*updates) );
     if (!updates) return E_OUTOFMEMORY;
 
-    updates->vtbl = &automatic_updates_vtbl;
+    updates->IAutomaticUpdates_iface.lpVtbl = &automatic_updates_vtbl;
     updates->refs = 1;
 
-    *ppObj = &updates->vtbl;
+    *ppObj = &updates->IAutomaticUpdates_iface;
 
     TRACE("returning iface %p\n", *ppObj);
     return S_OK;