///////////////////////////////////////////////////////////////////////////// // Strings.cpp - Interactive Demonstration of COM Component Implementation // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2014 // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Strings.h" #include #include STDMETHODIMP CStrings::PutString(BSTR str) { std::wcout << L"\n Component: received \"" << str << "\" from method PutString"; return S_OK; } STDMETHODIMP CStrings::GetString(BSTR* str) { CComBSTR compstr("string from component"); std::wcout << "\n Component: passing \"" << (std::wstring)compstr << "\" to method GetString"; *str = compstr.Detach(); return S_OK; }