Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.5 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: Testsrv.hxx
  4. //
  5. // Contents: This file contins the DLL entry points
  6. // LibMain
  7. // DllGetClassObject (Bindings key func)
  8. // DllCanUnloadNow
  9. // CBasicBndCF (class factory)
  10. // History: 30-Mar-92 SarahJ Created
  11. //
  12. //---------------------------------------------------------------------
  13. #ifndef __APP_H__
  14. #define __APP_H__
  15. #include "..\idl\itest.h"
  16. #include "cmarshal.hxx"
  17. extern "C" const IID CLSID_ITest;
  18. //+-------------------------------------------------------------------
  19. //
  20. // Class: CTestCF
  21. //
  22. // Synopsis: Class Factory for CTest
  23. //
  24. // Methods: IUnknown - QueryInterface, AddRef, Release
  25. // IClassFactory - CreateInstance
  26. //
  27. // History: 21-Mar-92 SarahJ Created
  28. //
  29. //--------------------------------------------------------------------
  30. class FAR CTestCF: public IClassFactory
  31. {
  32. public:
  33. // Constructor/Destructor
  34. CTestCF();
  35. ~CTestCF();
  36. // IUnknown
  37. STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv);
  38. STDMETHOD_(ULONG,AddRef) ( void );
  39. STDMETHOD_(ULONG,Release) ( void );
  40. // IClassFactory
  41. STDMETHODIMP CreateInstance(
  42. IUnknown FAR* pUnkOuter,
  43. REFIID iidInterface,
  44. void FAR* FAR* ppv);
  45. STDMETHODIMP LockServer(BOOL fLock);
  46. private:
  47. ULONG ref_count;
  48. };
  49. //+-------------------------------------------------------------------
  50. //
  51. // Class: CTest
  52. //
  53. // Synopsis: Test class
  54. //
  55. // Methods:
  56. //
  57. // History: 21-Mar-92 SarahJ Created
  58. //
  59. //--------------------------------------------------------------------
  60. class FAR CTest: public ITest
  61. {
  62. public:
  63. CTest();
  64. ~CTest();
  65. // IUnknown
  66. STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR * ppv);
  67. STDMETHOD_(ULONG,AddRef) ( void );
  68. STDMETHOD_(ULONG,Release) ( void );
  69. // ITest
  70. STDMETHOD_(DWORD, die) ( ITest *, ULONG, ULONG, ULONG );
  71. STDMETHOD (die_cpp) ( ULONG );
  72. STDMETHOD (die_nt) ( ULONG );
  73. STDMETHOD_(DWORD, DoTest) ( ITest *, ITest * );
  74. STDMETHOD_(BOOL, hello) ( );
  75. STDMETHOD (interrupt) ( ITest *, BOOL );
  76. STDMETHOD (recurse) ( ITest *, ULONG );
  77. STDMETHOD (recurse_interrupt)( ITest *, ULONG );
  78. STDMETHOD (sick) ( ULONG );
  79. STDMETHOD (sleep) ( ULONG );
  80. private:
  81. ULONG ref_count;
  82. CCMarshal *custom;
  83. };
  84. #endif
  85.