How to use sharedproperty in MTS?

hello,
Does anyone know how to use the shared property example provided in the
MTS help?
I mean how to call the IncreaseCounter from the other object in the same
MTS package? The following code is what I am trying to reference the MTS
object:
Please Help me!!

-Chao
//----------------------------
//Header file of Client Site :
//-------------------------
#include <mtx.h>
#include <mtxspm.h>
class ATL_NO_VTABLE TLoginManagerImpl :
  public CComObjectRootEx<CComSingleThreadModel>,
  public CComCoClass<TLoginManagerImpl, &CLSID_LoginManager>,
  public IObjectControl,
  public IDispatchImpl<ILoginManager, &IID_ILoginManager,
&LIBID_LoginMain>
{
private:
  ISharedPropertyGroupManager* manager;
  ISharedPropertyGroup* PG13;

  ISharedProperty* Counter;
public:
  TLoginManagerImpl()
  {
  }

  // Data used when registering Object
  //
  DECLARE_THREADING_MODEL(otApartment);
  DECLARE_PROGID("LoginMain.LoginManager");
  DECLARE_DESCRIPTION("");

  // Function invoked to (un)register object
  //
  static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
  {
    TTypedComServerRegistrarT<TLoginManagerImpl>
    regObj(GetObjectCLSID(), GetProgID(), GetDescription());
    return regObj.UpdateRegistry(bRegister);
  }

DECLARE_NOT_AGGREGATABLE(TLoginManagerImpl)

BEGIN_COM_MAP(TLoginManagerImpl)
  COM_INTERFACE_ENTRY(ILoginManager)
  COM_INTERFACE_ENTRY(IObjectControl)
  COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IObjectControl
public:
  STDMETHOD(Activate)();
  STDMETHOD(Login(BSTR UserID, BSTR Password, TVariant* Value));
  STDMETHOD(Logout(TVariant* Value));
  STDMETHOD(IncreaseCounter());
  STDMETHOD(DecreaseCounter());
  STDMETHOD_(BOOL, CanBePooled)();
  STDMETHOD_(void, Deactivate)();

  CComPtr<IObjectContext> m_spObjectContext;

// ILoginManager
public:

Quote
};

//----------------------------
//implementation file of Client Site :
//-------------------------

STDMETHODIMP TLoginManagerImpl::Activate()
{
  static TDll mtxex(_T("mtxex.dll"));
  static TDllProc1<IObjectContext**> getObjectContext(mtxex,
_T("GetObjectContext"));
  HRESULT hr = E_FAIL;
  if (getObjectContext)
    hr = getObjectContext(&m_spObjectContext);
  if (SUCCEEDED(hr)){
     VARIANT_BOOL _false = VARIANT_FALSE;
     VARIANT_BOOL _true = VARIANT_TRUE;
     CoCreateInstance( CLSID_SharedPropertyGroupManager, NULL,
                       CLSCTX_INPROC_SERVER,
                       IID_ISharedPropertyGroupManager,
(void**)manager);
     manager->CreatePropertyGroup(L"Test Group", LockSetGet, Standard,
&_false, &PG13);
     if ( (PG13->CreateProperty(L"Counter", &_true, &Counter)) ==
S_OK)     {
        Counter->put_Value(TVariant(0));
     }

    return S_OK;
  }
  return hr;

Quote
}

STDMETHODIMP_(BOOL) TLoginManagerImpl::CanBePooled()
{
  return FALSE;

Quote
}

STDMETHODIMP_(void) TLoginManagerImpl::Deactivate()
{
  PG13->Release();
  manager->Release();
  m_spObjectContext.Release();

Quote
}

STDMETHODIMP TLoginManagerImpl::Login(BSTR UserID, BSTR Password,
  TVariant* Value)
{

     IncreaseCounter();

     bool temp = true;
     *Value = temp;

     return S_OK;

Quote
}

STDMETHODIMP TLoginManagerImpl::Logout(TVariant* Value)
{
    DecreaseCounter();
    return S_OK;

Quote
}

STDMETHODIMP TLoginManagerImpl::IncreaseCounter()
{
  try
  {

  TVariant temp;
  Counter->get_Value(&temp);
  temp=(int)temp+1;;
     ShowMessage((int)temp);
  Counter->put_Value(temp);
  }
  catch(Exception &e)
  {
    return Error(e.Message.c_str(), IID_ILoginManager);
  }
  return S_OK;

Quote
}

STDMETHODIMP TLoginManagerImpl::DecreaseCounter()
{

  try
  {

  TVariant temp;
  Counter->get_Value(&temp);
  temp=(int)temp-1;;
  Counter->put_Value(temp);
  }
  catch(Exception &e)
  {
    return Error(e.Message.c_str(), IID_ILoginManager);
  }
  return S_OK;

Quote
}

//server site caller -- from MTS Data Module

ILoginManager *temp;
try{
OleCheck(m_spObjectContext->CreateInstance(CLSID_LoginManager,
IID_ILoginManager, (void **) temp ));

Quote
}

catch(...){
   ShowMessage("wrong");
Quote
}

AnsiString x = "123";
if (temp->Login(WideString(x).Detach(), WideString(x).Detach()))
  ShowMessage("login ok");
Quote
}