Synchronize with trunk r58606.
[reactos.git] / dll / win32 / wuapi / session.c
index 5f163c7..8c4b930 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+
 #define COBJMACROS
 
-#include "config.h"
+#include <config.h>
 #include <stdarg.h>
 
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "ole2.h"
-#include "wuapi.h"
+#include <windef.h>
+#include <winbase.h>
+//#include "winuser.h"
+#include <ole2.h>
+#include <wuapi.h>
 
-#include "wine/debug.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 +229,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;