source: trunk/Utilities/VbsCallback/Third.h @ 89

Last change on this file since 89 was 89, checked in by roman, 9 years ago
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1////////////////////////////////////////////////////////////
2// Copyright (C) Roman Ryltsov, 2008-2012
3// Created by Roman Ryltsov roman@alax.info
4//
5// $Id: Third.h 89 2012-08-11 12:31:11Z roman $
6
7#pragma once
8
9#include "VbsCallback_i.h"
10#include "_IThirdEvents_CP.h"
11
12////////////////////////////////////////////////////////////
13// CThird
14
15class ATL_NO_VTABLE CThird :
16        public CComObjectRootEx<CComSingleThreadModel>,
17        public CComCoClass<CThird, &CLSID_Third>,
18        public IConnectionPointContainerImpl<CThird>,
19        public CProxy_IThirdEvents<CThird>,
20        public IDispatchImpl<IThird>
21{
22public:
23
24DECLARE_REGISTRY_RESOURCEID(IDR_THIRD)
25
26BEGIN_COM_MAP(CThird)
27        COM_INTERFACE_ENTRY(IThird)
28        COM_INTERFACE_ENTRY(IDispatch)
29        COM_INTERFACE_ENTRY(IConnectionPointContainer)
30END_COM_MAP()
31
32BEGIN_CONNECTION_POINT_MAP(CThird)
33        CONNECTION_POINT_ENTRY(__uuidof(_IThirdEvents))
34END_CONNECTION_POINT_MAP()
35
36public:
37// CThird
38
39// IThird
40        STDMETHOD(OuterDo)(LONG nA, LONG* pnB) throw()
41        {
42                ATLASSERT(pnB);
43                CComVariant vB(nA + 1);
44                ATLVERIFY(SUCCEEDED(Fire_InnerDo(&vB)));
45                ATLASSERT(vB.vt == VT_I4);
46                *pnB = vB.lVal;
47                return S_OK;
48        }
49};
50
51OBJECT_ENTRY_AUTO(__uuidof(Third), CThird)
Note: See TracBrowser for help on using the repository browser.