// Test.cpp : Implementation of CTest #include "stdafx.h" #include "Test.h" #include using namespace std; // CTest STDMETHODIMP CTest::putString(BSTR bstr) { _bstr = bstr; wcout << L"\n server received: " << bstr; return S_OK; } STDMETHODIMP CTest::getString(BSTR* bstr) { _bstr += L"\n sent back by server"; *bstr = _bstr.Detach(); return S_OK; }