/////////////////////////////////////////////////////////////// // demo.cpp - Demonstrates Interop between C# and COM // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2013 // /////////////////////////////////////////////////////////////// #include "stdafx.h" #include "demo.h" #include #include STDMETHODIMP Cdemo::putString(BSTR str) { std::wcout << L"\n server received \"" << str << L"\"\n"; return S_OK; } STDMETHODIMP Cdemo::getString(BSTR* str) { CComBSTR rtn(L"a string from server"); *str = rtn.Detach(); return S_OK; }