/////////////////////////////////////////////////////////////// // Demo7.cpp - Definitions for custom class that defines // // component's functionality // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2003 // /////////////////////////////////////////////////////////////// // Demo7.cpp : Implementation of CDemo7 #include "stdafx.h" #include #include "Demo7.h" using namespace std; // CDemo7 const wstring prefix = L"\n Compt: \t"; STDMETHODIMP CDemo7::putString(BSTR str) { _str = str; wcout << prefix.c_str() << L"received:\t" << (BSTR)_str; return S_OK; } STDMETHODIMP CDemo7::getString(BSTR* str) { _str += L" from component"; wcout << prefix.c_str() << L"sending back:\t" << (BSTR)_str; *str = _str.Detach(); return S_OK; }