hnetcfg: Standardize the COM usage in apps.c.

This commit is contained in:
Michael Stefaniuc 2010-12-20 11:34:01 +01:00 committed by Alexandre Julliard
parent f2319fcd85
commit 97c5c33203
1 changed files with 8 additions and 8 deletions

View File

@ -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;