Leaked source code of windows server 2003
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.

157 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1995-1997 Microsoft Corporation
  3. Module Name :
  4. wamobj.hxx
  5. Abstract:
  6. Header file for the WAM (web application manager) object
  7. Author:
  8. David Kaplan ( DaveK ) 11-Mar-1997
  9. Wade Hilmo ( WadeH ) 08-Sep-2000
  10. Environment:
  11. User Mode - Win32
  12. Project:
  13. Wam DLL
  14. --*/
  15. # ifndef _WAMOBJ_HXX_
  16. # define _WAMOBJ_HXX_
  17. # define WAM_SIGNATURE (DWORD )' MAW' // will become "WAM " on debug
  18. # define WAM_SIGNATURE_FREE (DWORD )'fMAW' // will become "WAMf" on debug
  19. /************************************************************
  20. * Include Headers
  21. ************************************************************/
  22. # include "iwam.h"
  23. # include "resource.h"
  24. # include <atlbase.h>
  25. # include <w3isapi.h>
  26. class CWamModule: public CComModule
  27. {
  28. public:
  29. // LONG Lock();
  30. // LONG Unlock();
  31. };
  32. extern CWamModule _Module;
  33. # include <atlcom.h>
  34. /************************************************************
  35. * Type Definitions
  36. ************************************************************/
  37. /*++
  38. class WAM
  39. Class definition for the WAM object.
  40. --*/
  41. class ATL_NO_VTABLE WAM :
  42. public CComObjectRootEx<CComMultiThreadModel>,
  43. public CComCoClass<WAM, &CLSID_Wam>,
  44. public IWam
  45. {
  46. public:
  47. WAM()
  48. : m_dwSignature( WAM_SIGNATURE),
  49. m_fShuttingDown( FALSE )
  50. {
  51. }
  52. ~WAM()
  53. {
  54. // check for memory corruption and dangling pointers
  55. m_dwSignature = WAM_SIGNATURE_FREE;
  56. }
  57. DECLARE_GET_CONTROLLING_UNKNOWN()
  58. DECLARE_REGISTRY_RESOURCEID(IDR_WAM)
  59. BEGIN_COM_MAP(WAM)
  60. COM_INTERFACE_ENTRY(IWam)
  61. END_COM_MAP()
  62. HRESULT FinalConstruct()
  63. {
  64. return CallerHasAccess();
  65. }
  66. void FinalRelease()
  67. {
  68. }
  69. public:
  70. HRESULT STDMETHODCALLTYPE
  71. WamProcessIsapiRequest(
  72. BYTE *pCoreData,
  73. DWORD cbCoreData,
  74. IIsapiCore *pIsapiCore,
  75. DWORD *pdwHseResult
  76. );
  77. HRESULT STDMETHODCALLTYPE
  78. WamProcessIsapiCompletion(
  79. DWORD64 IsapiContext,
  80. DWORD cbCompletion,
  81. DWORD cbCompletionStatus
  82. );
  83. HRESULT STDMETHODCALLTYPE
  84. WamInitProcess(
  85. BYTE *szIsapiModule,
  86. DWORD cbIsapiModule,
  87. DWORD *pdwProcessId,
  88. LPSTR szClsid,
  89. LPSTR szIsapiHandlerInstance,
  90. DWORD dwCallingProcess
  91. );
  92. HRESULT STDMETHODCALLTYPE
  93. WamUninitProcess(
  94. VOID
  95. );
  96. HRESULT STDMETHODCALLTYPE
  97. WamMarshalAsyncReadBuffer(
  98. DWORD64 IsapiContext,
  99. BYTE *pBuffer,
  100. DWORD cbBuffer
  101. );
  102. private:
  103. HRESULT
  104. CallerHasAccess();
  105. private:
  106. DWORD m_dwSignature;
  107. BOOL m_fInProcess; // inproc or oop?
  108. BOOL m_fInPool; // can have multiple WAMs
  109. BOOL m_fShuttingDown; // shutting down?
  110. static HMODULE sm_hIsapiModule;
  111. static PFN_ISAPI_TERM_MODULE sm_pfnTermIsapiModule;
  112. static PFN_ISAPI_PROCESS_REQUEST sm_pfnProcessIsapiRequest;
  113. static PFN_ISAPI_PROCESS_COMPLETION sm_pfnProcessIsapiCompletion;
  114. }; // class WAM
  115. typedef WAM * PWAM;
  116. # endif // _WAMOBJ_HXX_
  117. /************************ End of File ***********************/