IEXTCONN.CPP

/* 
* IEXTCONN.CPP
*
* Template IExternalConnection interface implementation.
*
* Copyright (c)1993-1996 Microsoft Corporation, All Rights Reserved
*
* Kraig Brockschmidt, Software Design Engineer
* Microsoft Systems Developer Relations
*
* Internet : kraigb@microsoft.com
* Compuserve: >INTERNET:kraigb@microsoft.com
*/


#include "iextconn.h"



/*
* CImpIExternalConnection::CImpIExternalConnection
* CImpIExternalConnection::~CImpIExternalConnection
*
* Parameters (Constructor):
* pObj LPVOID of the object we're in.
* pUnkOuter LPUNKNOWN to which we delegate.
*/

CImpIExternalConnection::CImpIExternalConnection(LPVOID pObj
, LPUNKNOWN pUnkOuter)
{
m_cRef=0;
m_pObj=pObj;
m_pUnkOuter=pUnkOuter;
return;
}

CImpIExternalConnection::~CImpIExternalConnection(void)
{
return;
}



/*
* CImpIExternalConnection::QueryInterface
* CImpIExternalConnection::AddRef
* CImpIExternalConnection::Release
*
* Purpose:
* Delegating IUnknown members for CImpIExternalConnection.
*/

STDMETHODIMP CImpIExternalConnection::QueryInterface(REFIID riid
, LPVOID *ppv)
{
return m_pUnkOuter->QueryInterface(riid, ppv);
}


STDMETHODIMP_(ULONG) CImpIExternalConnection::AddRef(void)
{
++m_cRef;
return m_pUnkOuter->AddRef();
}

STDMETHODIMP_(ULONG) CImpIExternalConnection::Release(void)
{
--m_cRef;
return m_pUnkOuter->Release();
}




/*
* CImpIExternalConnection::AddConnection
*
* Purpose:
* Informs the object that a strong connection has been made to it.
*
* Parameters:
* dwConn DWORD identifying the type of connection, taken
* from the EXTCONN enumeration.
* dwReserved DWORD reserved. This is used inside OLE and
* should not be validated.
*
* Return Value:
* DWORD The number of connection counts on the
* object, used for debugging purposes only.
*/

STDMETHODIMP_(DWORD) CImpIExternalConnection::AddConnection
(DWORD dwConn, DWORD dwReserved)
{
return 0L;
}






/*
* CImpIExternalConnection::ReleaseConnection
*
* Purpose:
* Informs an object that a connection has been taken away from
* it in which case the object may need to shut down.
*
* Parameters:
* dwConn DWORD identifying the type of connection,
* taken from the EXTCONN enumeration.
* dwReserved DWORD reserved. This is used inside OLE and
* should not be validated.
* dwRerved DWORD reserved
* fLastReleaseCloses BOOL indicating if the last call to this
* function should close the object.
*
* Return Value:
* DWORD The number of remaining connection counts on
* the object, used for debugging purposes only.
*/

STDMETHODIMP_(DWORD) CImpIExternalConnection::ReleaseConnection
(DWORD dwConn, DWORD dwReserved, BOOL fLastReleaseCloses)
{
return 0L;
}