///////////////////////////////////////////////////////////////// // Echo.cpp - ATL InProc component that echos input string // // // // Language: C++, COM/IDL // // Platform: Dell Dimension 9200, WinXP, SP2 // // Application: Demonstration for CSE775 - Distrib. Objs // // Author: Jim Fawcett, Syracuse Univ, CST 2-187 // // (315) 443-3948, jfawcett@twcny.rr.com // // created: 01 Apr 07 // ///////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Echo.h" //----< echo input string >-------------------------------------- STDMETHODIMP CEcho::echo(BSTR* pStr) { CComBSTR revised = L"ATLecho component received: \""; revised.AppendBSTR(*pStr); revised.Append(L"\""); *pStr = revised.Detach(); return S_OK; }