Commit 97c5c332 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

hnetcfg: Standardize the COM usage in apps.c.

parent f2319fcd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment