From 1b7cc1f25985623fc399068858cfbea7d3630d24 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 20 Dec 2010 11:34:08 +0100 Subject: [PATCH] hnetcfg: Use an iface instead of an vtbl pointer in fw_manager. --- dlls/hnetcfg/manager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/hnetcfg/manager.c b/dlls/hnetcfg/manager.c index 7d6a7a5f492..6192c2dd687 100644 --- a/dlls/hnetcfg/manager.c +++ b/dlls/hnetcfg/manager.c @@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); typedef struct fw_manager { - const INetFwMgrVtbl *vtbl; + INetFwMgr INetFwMgr_iface; LONG refs; } fw_manager; static inline fw_manager *impl_from_INetFwMgr( INetFwMgr *iface ) { - return (fw_manager *)((char *)iface - FIELD_OFFSET( fw_manager, vtbl )); + return CONTAINING_RECORD(iface, fw_manager, INetFwMgr_iface); } static ULONG WINAPI fw_manager_AddRef( @@ -230,10 +230,10 @@ HRESULT NetFwMgr_create( IUnknown *pUnkOuter, LPVOID *ppObj ) fm = HeapAlloc( GetProcessHeap(), 0, sizeof(*fm) ); if (!fm) return E_OUTOFMEMORY; - fm->vtbl = &fw_manager_vtbl; + fm->INetFwMgr_iface.lpVtbl = &fw_manager_vtbl; fm->refs = 1; - *ppObj = &fm->vtbl; + *ppObj = &fm->INetFwMgr_iface; TRACE("returning iface %p\n", *ppObj); return S_OK;