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.

130 lines
3.6 KiB

  1. /************************** Om ***********************************
  2. ******************************************************************
  3. *
  4. * MainHandler.h
  5. *
  6. * AUTHOR: Guru Datta Venkatarama
  7. *
  8. * HISTORY:
  9. * Created : 01/29/97
  10. *
  11. *
  12. * SUMMARY:
  13. *
  14. ******************************************************************
  15. (c) Microsoft 1997 - All right reserved.
  16. ******************************************************************/
  17. #include <ifacesvr.h>
  18. #ifndef PPVOID
  19. typedef LPVOID* PPVOID;
  20. #endif
  21. #ifndef _MAINHANDLER_H
  22. #define _MAINHANDLER_H
  23. /*------------------------------------------------------------
  24. ** CHandlerClassFactory
  25. *
  26. * DESCRIPTION : ClassFactory Object for the In Proc Handler
  27. *
  28. * AUTHOR : Guru Datta Venkatarama
  29. * 01/29/97 11:02:35 (PST)
  30. *
  31. ------------------------------------------------------------*/
  32. class CHandlerClassFactory : public IClassFactory
  33. {
  34. private:
  35. protected:
  36. ULONG m_ClassFactory_refcount; // Object reference count
  37. public:
  38. GUID m_CLSID_whoamI;
  39. // constructor
  40. CHandlerClassFactory(void);
  41. // destructor
  42. ~CHandlerClassFactory(void);
  43. // IUnknown methods
  44. STDMETHODIMP QueryInterface(REFIID, PPVOID);
  45. STDMETHODIMP_(ULONG) AddRef(void);
  46. STDMETHODIMP_(ULONG) Release(void);
  47. // IClassFactory methods
  48. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, PPVOID);
  49. STDMETHODIMP LockServer(BOOL);
  50. ULONG GetRefCount(void) { return(m_ClassFactory_refcount); }
  51. };
  52. /*------------------------------------------------------------
  53. ** Property Sheet Interface Object
  54. *
  55. * DESCRIPTION : Here be the C object that implements the Property
  56. interface.
  57. *
  58. * AUTHOR : Guru Datta Venkatarama
  59. * 01/31/97 11:09:54 (PST)
  60. *
  61. ------------------------------------------------------------*/
  62. class CDIGameCntrlPropSheet;
  63. typedef CDIGameCntrlPropSheet *LPCDIGAMECNTRLPROPSHEET;
  64. class CServerClassFactory;
  65. /*------------------------------------------------------------
  66. ** Actual handler Object
  67. *
  68. * DESCRIPTION : Here be the actual Plug in handler object class...
  69. *
  70. * AUTHOR : Guru Datta Venkatarama
  71. * 01/31/97 11:15:32 (PST)
  72. *
  73. ------------------------------------------------------------*/
  74. class CPluginHandler : public IServerCharacteristics
  75. {
  76. friend CDIGameCntrlPropSheet;
  77. private:
  78. // server interfaces
  79. LPCDIGAMECNTRLPROPSHEET m_pImpIServerProperty;
  80. BOOL LoadServerInterface(REFIID, PPVOID);
  81. public:
  82. // object lifetime maintanence count
  83. ULONG m_cPluginHandler_refcount;
  84. // generic handler to specific server identity
  85. GUID m_CLSID_whoamI;
  86. // constructor ...
  87. CPluginHandler(void);
  88. // destructor ....
  89. ~CPluginHandler(void);
  90. // Class Diagnostics code :
  91. ULONG GetRefCount(void) { return(m_cPluginHandler_refcount); }
  92. // IUnknown methods
  93. STDMETHODIMP QueryInterface(REFIID, PPVOID);
  94. STDMETHODIMP_(ULONG) AddRef(void);
  95. STDMETHODIMP_(ULONG) Release(void);
  96. // CImpIServerProperty methods
  97. STDMETHODIMP Launch(HWND hWnd, USHORT startpage, USHORT nID);
  98. STDMETHODIMP GetReport(LPDIGCSHEETINFO *lpSheetInfo, LPDIGCPAGEINFO *lpPageInfo);
  99. // accessors to the contined classes Interface pointers
  100. LPCDIGAMECNTRLPROPSHEET GetServerPropIface(void)
  101. {
  102. if(LoadServerInterface(IID_IDIGameCntrlPropSheet, (void **)&m_pImpIServerProperty))
  103. return(m_pImpIServerProperty);
  104. else
  105. return(NULL);
  106. }
  107. };
  108. typedef CPluginHandler *tpCPluginHandler;
  109. int CALLBACK PropSheetCallback(HWND hDlg,UINT uMsg,LPARAM lParam);
  110. #endif
  111. //--------------------------------------------------------------EOF