Sync with trunk r62754.
[reactos.git] / dll / win32 / wuapi / session.c
index 5f163c7..59d3f6c 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"
 #include "wuapi_private.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
-
 typedef struct _update_session
 {
-    const struct IUpdateSessionVtbl *vtbl;
+    IUpdateSession IUpdateSession_iface;
     LONG refs;
 } update_session;
 
 static inline update_session *impl_from_IUpdateSession( IUpdateSession *iface )
 {
-    return (update_session *)((char *)iface - FIELD_OFFSET( update_session, vtbl ));
+    return CONTAINING_RECORD(iface, update_session, IUpdateSession_iface);
 }
 
 static ULONG WINAPI update_session_AddRef(
@@ -226,10 +212,10 @@ HRESULT UpdateSession_create( IUnknown *pUnkOuter, LPVOID *ppObj )
     session = HeapAlloc( GetProcessHeap(), 0, sizeof(*session) );
     if (!session) return E_OUTOFMEMORY;
 
-    session->vtbl = &update_session_vtbl;
+    session->IUpdateSession_iface.lpVtbl = &update_session_vtbl;
     session->refs = 1;
 
-    *ppObj = &session->vtbl;
+    *ppObj = &session->IUpdateSession_iface;
 
     TRACE("returning iface %p\n", *ppObj);
     return S_OK;