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.

127 lines
3.8 KiB

  1. /*===================================================================
  2. Microsoft Denali
  3. Microsoft Confidential.
  4. Copyright 1996 Microsoft Corporation. All Rights Reserved.
  5. Component: Hit Manager
  6. File: Denali.h
  7. Owner: PramodD
  8. This is the Hit (Request) Manager header file.
  9. ===================================================================*/
  10. #ifndef DENALI_H
  11. #define DENALI_H
  12. //#define LOG_FCNOTIFICATIONS // logs file change notifications to a file
  13. extern BOOL g_fShutDownInProgress;
  14. inline IsShutDownInProgress()
  15. {
  16. return g_fShutDownInProgress;
  17. }
  18. extern HRESULT InitializeResourceDll();
  19. extern VOID UninitializeResourceDll();
  20. // de-comment the following line to build with no perfmon counters
  21. //#define PERF_DISABLE
  22. DWORD HandleHit(CIsapiReqInfo *pIReq);
  23. //void InitODBC( void );
  24. //void UnInitODBC( void );
  25. extern BOOL g_fOOP;
  26. extern HINSTANCE g_hinstDLL;
  27. extern HMODULE g_hResourceDLL;
  28. /* intrinsic object names (bug 164)
  29. NOTE to add an intrinsic object to denali, follow these steps:
  30. 1. add both sz and wsz versions of the object name below
  31. 2. add a check for the sz version of the object name in CTemplate::FValidObjectName
  32. */
  33. #define CONCAT(a, b) a ## b
  34. #define WSZ(x) CONCAT(L, x)
  35. #define SZ_OBJ_APPLICATION "Application"
  36. #define SZ_OBJ_REQUEST "Request"
  37. #define SZ_OBJ_RESPONSE "Response"
  38. #define SZ_OBJ_SERVER "Server"
  39. #define SZ_OBJ_CERTIFICATE "Certificate"
  40. #define SZ_OBJ_SESSION "Session"
  41. #define SZ_OBJ_SCRIPTINGNAMESPACE "ScriptingNamespace"
  42. #define SZ_OBJ_OBJECTCONTEXT "ObjectContext"
  43. #define SZ_OBJ_ASPPAGETLB "ASPPAGETLB"
  44. #define SZ_OBJ_ASPGLOBALTLB "ASPGLOBALTLB"
  45. #define WSZ_OBJ_APPLICATION WSZ(SZ_OBJ_APPLICATION)
  46. #define WSZ_OBJ_REQUEST WSZ(SZ_OBJ_REQUEST)
  47. #define WSZ_OBJ_RESPONSE WSZ(SZ_OBJ_RESPONSE)
  48. #define WSZ_OBJ_SERVER WSZ(SZ_OBJ_SERVER)
  49. #define WSZ_OBJ_CERTIFICATE WSZ(SZ_OBJ_CERTIFICATE)
  50. #define WSZ_OBJ_SESSION WSZ(SZ_OBJ_SESSION)
  51. #define WSZ_OBJ_SCRIPTINGNAMESPACE WSZ(SZ_OBJ_SCRIPTINGNAMESPACE)
  52. #define WSZ_OBJ_OBJECTCONTEXT WSZ(SZ_OBJ_OBJECTCONTEXT)
  53. #define WSZ_OBJ_ASPPAGETLB WSZ(SZ_OBJ_ASPPAGETLB)
  54. #define WSZ_OBJ_ASPGLOBALTLB WSZ(SZ_OBJ_ASPGLOBALTLB)
  55. #define BSTR_OBJ_APPLICATION g_bstrApplication
  56. #define BSTR_OBJ_REQUEST g_bstrRequest
  57. #define BSTR_OBJ_RESPONSE g_bstrResponse
  58. #define BSTR_OBJ_SERVER g_bstrServer
  59. #define BSTR_OBJ_CERTIFICATE g_bstrCertificate
  60. #define BSTR_OBJ_SESSION g_bstrSession
  61. #define BSTR_OBJ_SCRIPTINGNAMESPACE g_bstrScriptingNamespace
  62. #define BSTR_OBJ_OBJECTCONTEXT g_bstrObjectContext
  63. // Cached BSTRs
  64. extern BSTR g_bstrApplication;
  65. extern BSTR g_bstrRequest;
  66. extern BSTR g_bstrResponse;
  67. extern BSTR g_bstrServer;
  68. extern BSTR g_bstrCertificate;
  69. extern BSTR g_bstrSession;
  70. extern BSTR g_bstrScriptingNamespace;
  71. extern BSTR g_bstrObjectContext;
  72. // Dll name
  73. #define ASP_DLL_NAME "ASP.DLL"
  74. // Max # of bytes we will allocate before we assume an attack by a malicious browser
  75. #define REQUEST_ALLOC_MAX (100 * 1024)
  76. #define SZ_GLOBAL_ASA _T("GLOBAL.ASA")
  77. #define CCH_GLOBAL_ASA 10
  78. /*
  79. * InitializeCriticalSection can throw. Use this macro instead
  80. */
  81. #define ErrInitCriticalSection( cs, hr ) \
  82. do { \
  83. hr = S_OK; \
  84. __try \
  85. { \
  86. INITIALIZE_CRITICAL_SECTION(cs); \
  87. } \
  88. __except(1) \
  89. { \
  90. hr = E_UNEXPECTED; \
  91. } \
  92. } while (0)
  93. #ifdef LOG_FCNOTIFICATIONS
  94. void LfcnCreateLogFile();
  95. void LfcnCopyAdvance(char** ppchDest, const char* sz);
  96. void LfcnAppendLog(const char* sz);
  97. void LfcnLogNotification(char* szFile);
  98. void LfcnLogHandleCreation(int i, char* szApp);
  99. void LfcnUnmapLogFile();
  100. #endif //LOG_FCNOTIFICATIONS
  101. #endif // DENALI_H