ICP  1
test.h
Go to the documentation of this file.
1 // test.h : Declaration of the Ctest
2 
3 #pragma once
4 #include "resource.h" // main symbols
5 
6 
7 
8 #include "instapi_i.h"
9 #include "_ItestEvents_CP.h"
10 
11 
12 
13 using namespace ATL;
14 
15 
16 // Ctest
17 
18 class ATL_NO_VTABLE Ctest :
19  public CComObjectRootEx<CComMultiThreadModel>,
20  public CComCoClass<Ctest, &CLSID_test>,
21  public ISupportErrorInfo,
22  public IConnectionPointContainerImpl<Ctest>,
23  public CProxy_ItestEvents<Ctest>,
24  public IDispatchImpl<Itest, &IID_Itest, &LIBID_instapiLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
25 {
26 public:
28  {
29  }
30 
31 DECLARE_REGISTRY_RESOURCEID(IDR_TEST)
32 
33 
34 BEGIN_COM_MAP(Ctest)
35  COM_INTERFACE_ENTRY(Itest)
36  COM_INTERFACE_ENTRY(IDispatch)
37  COM_INTERFACE_ENTRY(ISupportErrorInfo)
38  COM_INTERFACE_ENTRY(IConnectionPointContainer)
39 END_COM_MAP()
40 
41 BEGIN_CONNECTION_POINT_MAP(Ctest)
42  CONNECTION_POINT_ENTRY(__uuidof(_ItestEvents))
43 END_CONNECTION_POINT_MAP()
44 // ISupportsErrorInfo
45  STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
46 
47 
48  DECLARE_PROTECT_FINAL_CONSTRUCT()
49 
50  HRESULT FinalConstruct()
51  {
52  return S_OK;
53  }
54 
55  void FinalRelease()
56  {
57  }
58 
59 public:
60 
61 
62 
63  STDMETHOD(setBlockValue)(BSTR block_name, VARIANT block_value);
64  STDMETHOD(getBlockValue)(BSTR block_name, VARIANT* block_value);
65  STDMETHOD(getBlock)(BSTR name, IDispatch** block);
66  STDMETHOD(getBlock2)(BSTR name, Iblock** block);
67 };
68 
69 OBJECT_ENTRY_AUTO(__uuidof(test), Ctest)
static int test()
Ctest()
Definition: test.h:27
void FinalRelease()
Definition: test.h:55
Definition: test.h:18