///////////////////////////////////////////////////////////////// // simpleTest.cpp - component implementing IPersistFile // // // // Platform: Dell Dimension 8100, Windows 2000, SP2 // // Application: Demonstration of ATL 7.0 for CSE775 // // Modified: Jim Fawcett, Syracuse Univ, CST 2-187 // // (315) 443-3948, fawcett@ecs.syr.edu // ///////////////////////////////////////////////////////////////// #include "stdafx.h" #include "simpletest.h" #include STDMETHODIMP Csimpletest::SetName(BSTR name) { USES_CONVERSION; m_Name = W2A(name); std::cout << "\n SetName: " << m_Name; return S_OK; } STDMETHODIMP Csimpletest::SetColor(BSTR color) { USES_CONVERSION; m_Color = W2A(color); std::cout << "\n SetColor: " << m_Color; return S_OK; } STDMETHODIMP Csimpletest::GetName(BSTR* name) { USES_CONVERSION; *name = CComBSTR(m_Name).Detach(); return S_OK; } STDMETHODIMP Csimpletest::GetColor(BSTR* color) { USES_CONVERSION; *color = CComBSTR(m_Color).Detach(); return S_OK; }