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