dpnet: COM cleanup for the IDirectPlay8LobbiedApplication iface.

This commit is contained in:
Michael Stefaniuc 2011-08-05 13:14:21 +02:00 committed by Alexandre Julliard
parent 41059e1606
commit 3a9fa90257
2 changed files with 62 additions and 61 deletions

View File

@ -73,10 +73,8 @@ struct IDirectPlay8AddressImpl
*/ */
struct IDirectPlay8LobbiedApplicationImpl struct IDirectPlay8LobbiedApplicationImpl
{ {
/* IUnknown fields */ IDirectPlay8LobbiedApplication IDirectPlay8LobbiedApplication_iface;
const IDirectPlay8LobbiedApplicationVtbl *lpVtbl; LONG ref;
LONG ref;
/* IDirectPlay8LobbiedApplication fields */
}; };
/***************************************************************************** /*****************************************************************************

View File

@ -37,12 +37,17 @@
WINE_DEFAULT_DEBUG_CHANNEL(dpnet); WINE_DEFAULT_DEBUG_CHANNEL(dpnet);
static inline IDirectPlay8LobbiedApplicationImpl *impl_from_IDirectPlay8LobbiedApplication(IDirectPlay8LobbiedApplication *iface)
{
return CONTAINING_RECORD(iface, IDirectPlay8LobbiedApplicationImpl,
IDirectPlay8LobbiedApplication_iface);
}
/* IDirectPlay8LobbiedApplication IUnknown parts follow: */ /* IDirectPlay8LobbiedApplication IUnknown parts follow: */
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_QueryInterface( static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_QueryInterface(IDirectPlay8LobbiedApplication *iface,
PDIRECTPLAY8LOBBIEDAPPLICATION iface, REFIID riid, void **ppobj)
REFIID riid, {
LPVOID *ppobj) { IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface;
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IDirectPlay8LobbiedApplication)) { || IsEqualGUID(riid, &IID_IDirectPlay8LobbiedApplication)) {
@ -55,9 +60,9 @@ static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_QueryInterface(
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI IDirectPlay8LobbiedApplicationImpl_AddRef( static ULONG WINAPI IDirectPlay8LobbiedApplicationImpl_AddRef(IDirectPlay8LobbiedApplication *iface)
PDIRECTPLAY8LOBBIEDAPPLICATION iface) { {
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
ULONG refCount = InterlockedIncrement(&This->ref); ULONG refCount = InterlockedIncrement(&This->ref);
TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); TRACE("(%p)->(ref before=%u)\n", This, refCount - 1);
@ -65,9 +70,9 @@ static ULONG WINAPI IDirectPlay8LobbiedApplicationImpl_AddRef(
return refCount; return refCount;
} }
static ULONG WINAPI IDirectPlay8LobbiedApplicationImpl_Release( static ULONG WINAPI IDirectPlay8LobbiedApplicationImpl_Release(IDirectPlay8LobbiedApplication *iface)
PDIRECTPLAY8LOBBIEDAPPLICATION iface) { {
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
ULONG refCount = InterlockedDecrement(&This->ref); ULONG refCount = InterlockedDecrement(&This->ref);
TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); TRACE("(%p)->(ref before=%u)\n", This, refCount + 1);
@ -80,81 +85,78 @@ static ULONG WINAPI IDirectPlay8LobbiedApplicationImpl_Release(
/* IDirectPlay8LobbiedApplication Interface follow: */ /* IDirectPlay8LobbiedApplication Interface follow: */
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_Initialize(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_Initialize(IDirectPlay8LobbiedApplication *iface,
CONST PVOID pvUserContext, void * const pvUserContext, const PFNDPNMESSAGEHANDLER pfn,
CONST PFNDPNMESSAGEHANDLER pfn, DPNHANDLE * const pdpnhConnection, const DWORD dwFlags)
DPNHANDLE* CONST pdpnhConnection, {
CONST DWORD dwFlags) { IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface;
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_RegisterProgram(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_RegisterProgram(IDirectPlay8LobbiedApplication *iface,
PDPL_PROGRAM_DESC pdplProgramDesc, PDPL_PROGRAM_DESC pdplProgramDesc, const DWORD dwFlags)
CONST DWORD dwFlags) { {
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_UnRegisterProgram(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_UnRegisterProgram(IDirectPlay8LobbiedApplication *iface,
GUID* pguidApplication, GUID *pguidApplication, const DWORD dwFlags)
CONST DWORD dwFlags) { {
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_Send(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_Send(IDirectPlay8LobbiedApplication *iface,
CONST DPNHANDLE hConnection, const DPNHANDLE hConnection, BYTE * const pBuffer, const DWORD pBufferSize,
BYTE* CONST pBuffer, const DWORD dwFlags)
CONST DWORD pBufferSize, {
CONST DWORD dwFlags) { IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface;
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_SetAppAvailable(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_SetAppAvailable(IDirectPlay8LobbiedApplication *iface,
CONST BOOL fAvailable, const BOOL fAvailable, const DWORD dwFlags)
CONST DWORD dwFlags) { {
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_UpdateStatus(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_UpdateStatus(IDirectPlay8LobbiedApplication *iface,
CONST DPNHANDLE hConnection, const DPNHANDLE hConnection, const DWORD dwStatus, const DWORD dwFlags)
CONST DWORD dwStatus, {
CONST DWORD dwFlags) { IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface;
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_Close(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_Close(IDirectPlay8LobbiedApplication *iface,
CONST DWORD dwFlags) { const DWORD dwFlags)
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; {
IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_GetConnectionSettings(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_GetConnectionSettings(IDirectPlay8LobbiedApplication *iface,
CONST DPNHANDLE hConnection, const DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS * const pdplSessionInfo,
DPL_CONNECTION_SETTINGS* CONST pdplSessionInfo, DWORD *pdwInfoSize, const DWORD dwFlags)
DWORD* pdwInfoSize, {
CONST DWORD dwFlags) { IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface;
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_SetConnectionSettings(PDIRECTPLAY8LOBBIEDAPPLICATION iface, static HRESULT WINAPI IDirectPlay8LobbiedApplicationImpl_SetConnectionSettings(IDirectPlay8LobbiedApplication *iface,
CONST DPNHANDLE hConnection, const DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS * const pdplSessionInfo,
CONST DPL_CONNECTION_SETTINGS* CONST pdplSessionInfo, const DWORD dwFlags)
CONST DWORD dwFlags) { {
IDirectPlay8LobbiedApplicationImpl *This = (IDirectPlay8LobbiedApplicationImpl *)iface; IDirectPlay8LobbiedApplicationImpl *This = impl_from_IDirectPlay8LobbiedApplication(iface);
FIXME("(%p): stub\n", This); FIXME("(%p): stub\n", This);
return DPN_OK; return DPN_OK;
} }
@ -187,7 +189,8 @@ HRESULT DPNET_CreateDirectPlay8LobbiedApp(LPCLASSFACTORY iface, LPUNKNOWN punkOu
*ppobj = NULL; *ppobj = NULL;
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
app->lpVtbl = &DirectPlay8LobbiedApplication_Vtbl; app->IDirectPlay8LobbiedApplication_iface.lpVtbl = &DirectPlay8LobbiedApplication_Vtbl;
app->ref = 0; /* will be inited with QueryInterface */ app->ref = 0;
return IDirectPlay8LobbiedApplicationImpl_QueryInterface ((PDIRECTPLAY8LOBBIEDAPPLICATION)app, riid, ppobj); return IDirectPlay8LobbiedApplicationImpl_QueryInterface(&app->IDirectPlay8LobbiedApplication_iface,
riid, ppobj);
} }