summaryrefslogtreecommitdiffstats
path: root/private/oleutest/cmarshal/app/app.hxx
blob: 91339b76caca9fa5732f0fb3b623edf2d1f6fbbf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//+-------------------------------------------------------------------
//
//  File:       Testsrv.hxx
//
//  Contents:   This file contins the DLL entry points
//                      LibMain
//                      DllGetClassObject (Bindings key func)
//                      DllCanUnloadNow
//                      CBasicBndCF (class factory)
//  History:	30-Mar-92      SarahJ      Created
//
//---------------------------------------------------------------------

#ifndef __APP_H__
#define __APP_H__

#include "..\idl\itest.h"
#include "cmarshal.hxx"

extern "C" const IID CLSID_ITest;

//+-------------------------------------------------------------------
//
//  Class:    CTestCF
//
//  Synopsis: Class Factory for CTest
//
//  Methods:  IUnknown      - QueryInterface, AddRef, Release
//            IClassFactory - CreateInstance
//
//  History:  21-Mar-92  SarahJ  Created
//
//--------------------------------------------------------------------


class FAR CTestCF: public IClassFactory
{
public:

    // Constructor/Destructor
    CTestCF();
    ~CTestCF();

    // IUnknown
    STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv);
    STDMETHOD_(ULONG,AddRef)     ( void );
    STDMETHOD_(ULONG,Release)    ( void );

    // IClassFactory
    STDMETHODIMP	CreateInstance(
			    IUnknown FAR* pUnkOuter,
			    REFIID iidInterface,
			    void FAR* FAR* ppv);

    STDMETHODIMP	LockServer(BOOL fLock);

private:

    ULONG ref_count;
};

//+-------------------------------------------------------------------
//
//  Class:    CTest
//
//  Synopsis: Test class
//
//  Methods:
//
//  History:  21-Mar-92  SarahJ  Created
//
//--------------------------------------------------------------------


class FAR CTest: public ITest
{
public:
                         CTest();

			~CTest();

    // IUnknown
    STDMETHODIMP	QueryInterface(REFIID iid, void FAR * FAR * ppv);
    STDMETHOD_(ULONG,AddRef)     ( void );
    STDMETHOD_(ULONG,Release)    ( void );

    //	ITest
    STDMETHOD_(DWORD, die)    ( ITest *, ULONG, ULONG, ULONG );
    STDMETHOD (die_cpp)       ( ULONG );
    STDMETHOD (die_nt)        ( ULONG );
    STDMETHOD_(DWORD, DoTest) ( ITest *, ITest * );
    STDMETHOD_(BOOL, hello)   ( );
    STDMETHOD (interrupt)     ( ITest *, BOOL );
    STDMETHOD (recurse)       ( ITest *, ULONG );
    STDMETHOD (recurse_interrupt)( ITest *, ULONG );
    STDMETHOD (sick)          ( ULONG );
    STDMETHOD (sleep)         ( ULONG );



private:

    ULONG      ref_count;
    CCMarshal *custom;
};


#endif