1*5c66ce18SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*5c66ce18SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*5c66ce18SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*5c66ce18SAndrew Rist * distributed with this work for additional information 6*5c66ce18SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*5c66ce18SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*5c66ce18SAndrew Rist * "License"); you may not use this file except in compliance 9*5c66ce18SAndrew Rist * with the License. You may obtain a copy of the License at 10*5c66ce18SAndrew Rist * 11*5c66ce18SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*5c66ce18SAndrew Rist * 13*5c66ce18SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*5c66ce18SAndrew Rist * software distributed under the License is distributed on an 15*5c66ce18SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*5c66ce18SAndrew Rist * KIND, either express or implied. See the License for the 17*5c66ce18SAndrew Rist * specific language governing permissions and limitations 18*5c66ce18SAndrew Rist * under the License. 19*5c66ce18SAndrew Rist * 20*5c66ce18SAndrew Rist *************************************************************/ 21*5c66ce18SAndrew Rist 22*5c66ce18SAndrew Rist 23cdf0e10cSrcweir // Basic.h : Declaration of the CBasic 24cdf0e10cSrcweir 25cdf0e10cSrcweir #ifndef __Foo_H_ 26cdf0e10cSrcweir #define __Foo_H_ 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "resource.h" // main symbols 29cdf0e10cSrcweir //#include "AxTestComponents.h" 30cdf0e10cSrcweir #import "AxTestComponents.tlb" no_namespace no_implementation raw_interfaces_only named_guids 31cdf0e10cSrcweir //#include "AxTestComponents.h" 32cdf0e10cSrcweir ///////////////////////////////////////////////////////////////////////////// 33cdf0e10cSrcweir // CBasic 34cdf0e10cSrcweir class ATL_NO_VTABLE CFoo : 35cdf0e10cSrcweir public CComObjectRootEx<CComSingleThreadModel>, 36cdf0e10cSrcweir public CComCoClass<CFoo, &CLSID_Foo>, 37cdf0e10cSrcweir public IFoo 38cdf0e10cSrcweir 39cdf0e10cSrcweir // public IDispatchImpl<IFoo, &__uuidof(IFoo), &LIBID_AXTESTCOMPONENTSLib, /* wMajor = */ 1, /* wMinor = */ 0> 40cdf0e10cSrcweir { 41cdf0e10cSrcweir public: 42cdf0e10cSrcweir CFoo(); 43cdf0e10cSrcweir ~CFoo(); 44cdf0e10cSrcweir 45cdf0e10cSrcweir DECLARE_REGISTRY_RESOURCEID(IDR_BASIC) 46cdf0e10cSrcweir 47cdf0e10cSrcweir DECLARE_PROTECT_FINAL_CONSTRUCT() 48cdf0e10cSrcweir 49cdf0e10cSrcweir BEGIN_COM_MAP(CFoo) 50cdf0e10cSrcweir COM_INTERFACE_ENTRY(IFoo) 51cdf0e10cSrcweir END_COM_MAP() 52cdf0e10cSrcweir 53cdf0e10cSrcweir 54cdf0e10cSrcweir STDMETHOD(Foo)(IUnknown* val); 55cdf0e10cSrcweir 56cdf0e10cSrcweir // IFoo Methods 57cdf0e10cSrcweir public: 58cdf0e10cSrcweir }; 59cdf0e10cSrcweir 60cdf0e10cSrcweir #endif //__BASIC_H_ 61cdf0e10cSrcweir 62