///////////////////////////////////////////////////////////////// // simpleTest.h - 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 // ///////////////////////////////////////////////////////////////// #pragma once #include "resource.h" // main symbols #include "IPersistFileImpl.h" #include "atlcomcli.h" // Isimpletest [ object, uuid("CA8618DF-5723-42B5-9ED3-F772742C79AF"), dual, helpstring("Isimpletest Interface"), pointer_default(unique) ] __interface Isimpletest : IDispatch { [id(1), helpstring("method SetName")] HRESULT SetName([in] BSTR name); [id(2), helpstring("method SetColor")] HRESULT SetColor([in] BSTR color); [id(3), helpstring("method GetName")] HRESULT GetName([out,retval] BSTR* name); [id(4), helpstring("method GetColor")] HRESULT GetColor([out,retval] BSTR* color); }; // _IsimpletestEvents [ dispinterface, uuid("0675555E-B54D-4629-B63D-14A5D8D53060"), helpstring("_IsimpletestEvents Interface") ] __interface _IsimpletestEvents { }; // ///////////////////////////////////////////////////// // Csimpletest [ coclass, threading("apartment"), event_source("com"), vi_progid("simple.simpletest"), progid("simple.simpletest.1"), version(1.0), uuid("45037119-FF3E-4A89-BDBE-2F5FA6262A67"), helpstring("simpletest Class") ] class ATL_NO_VTABLE Csimpletest : public IPersistFileImpl, public Isimpletest { public: Csimpletest() { } __event __interface _IsimpletestEvents; DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(SetName)(BSTR name); STDMETHOD(SetColor)(BSTR color); STDMETHOD(GetName)(BSTR* name); STDMETHOD(GetColor)(BSTR* color); };