Michael Stefaniuc : hnetcfg: Standardize the COM usage in apps.c.
Alexandre Julliard
julliard at winehq.org
Mon Dec 20 17:49:52 CST 2010
Module: wine
Branch: master
Commit: 97c5c33203d1649dce56c38f4deb14ead417042d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=97c5c33203d1649dce56c38f4deb14ead417042d
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Dec 20 11:34:01 2010 +0100
hnetcfg: Standardize the COM usage in apps.c.
---
dlls/hnetcfg/apps.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/hnetcfg/apps.c b/dlls/hnetcfg/apps.c
index fbd603c..81bfe36 100644
--- a/dlls/hnetcfg/apps.c
+++ b/dlls/hnetcfg/apps.c
@@ -36,13 +36,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
typedef struct fw_app
{
- const INetFwAuthorizedApplicationVtbl *vtbl;
+ INetFwAuthorizedApplication INetFwAuthorizedApplication_iface;
LONG refs;
} fw_app;
static inline fw_app *impl_from_INetFwAuthorizedApplication( INetFwAuthorizedApplication *iface )
{
- return (fw_app *)((char *)iface - FIELD_OFFSET( fw_app, vtbl ));
+ return CONTAINING_RECORD(iface, fw_app, INetFwAuthorizedApplication_iface);
}
static ULONG WINAPI fw_app_AddRef(
@@ -297,23 +297,23 @@ HRESULT NetFwAuthorizedApplication_create( IUnknown *pUnkOuter, LPVOID *ppObj )
fa = HeapAlloc( GetProcessHeap(), 0, sizeof(*fa) );
if (!fa) return E_OUTOFMEMORY;
- fa->vtbl = &fw_app_vtbl;
+ fa->INetFwAuthorizedApplication_iface.lpVtbl = &fw_app_vtbl;
fa->refs = 1;
- *ppObj = &fa->vtbl;
+ *ppObj = &fa->INetFwAuthorizedApplication_iface;
TRACE("returning iface %p\n", *ppObj);
return S_OK;
}
typedef struct fw_apps
{
- const INetFwAuthorizedApplicationsVtbl *vtbl;
+ INetFwAuthorizedApplications INetFwAuthorizedApplications_iface;
LONG refs;
} fw_apps;
static inline fw_apps *impl_from_INetFwAuthorizedApplications( INetFwAuthorizedApplications *iface )
{
- return (fw_apps *)((char *)iface - FIELD_OFFSET( fw_apps, vtbl ));
+ return CONTAINING_RECORD(iface, fw_apps, INetFwAuthorizedApplications_iface);
}
static ULONG WINAPI fw_apps_AddRef(
@@ -490,10 +490,10 @@ HRESULT NetFwAuthorizedApplications_create( IUnknown *pUnkOuter, LPVOID *ppObj )
fa = HeapAlloc( GetProcessHeap(), 0, sizeof(*fa) );
if (!fa) return E_OUTOFMEMORY;
- fa->vtbl = &fw_apps_vtbl;
+ fa->INetFwAuthorizedApplications_iface.lpVtbl = &fw_apps_vtbl;
fa->refs = 1;
- *ppObj = &fa->vtbl;
+ *ppObj = &fa->INetFwAuthorizedApplications_iface;
TRACE("returning iface %p\n", *ppObj);
return S_OK;
More information about the wine-cvs
mailing list