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.

142 lines
3.6 KiB

  1. //
  2. //
  3. //
  4. #ifndef _PROP_SHEET_H
  5. #define _PROP_SHEET_H
  6. #include <vector>
  7. //#ifndef MD_APP_PERIODIC_RESTART_TIME
  8. //#define MD_APP_PERIODIC_RESTART_TIME 2111
  9. //#endif
  10. //#ifndef MD_APP_PERIODIC_RESTART_REQUESTS
  11. //#define MD_APP_PERIODIC_RESTART_REQUESTS 2112
  12. //#endif
  13. //#ifndef MD_APP_PERIODIC_RESTART_SCHEDULE
  14. //#define MD_APP_PERIODIC_RESTART_SCHEDULE 2113
  15. //#endif
  16. #ifndef MD_ASP_DISKTEMPLATECACHEDIRECTORY
  17. #define MD_ASP_DISKTEMPLATECACHEDIRECTORY 7036
  18. #endif
  19. #ifndef MD_ASP_MAXDISKTEMPLATECACHEFILES
  20. #define MD_ASP_MAXDISKTEMPLATECACHEFILES 7040
  21. #endif
  22. #define CACHE_UNLIM_MAX 999999
  23. typedef struct _Mapping
  24. {
  25. CString ext;
  26. CString path;
  27. CString verbs;
  28. DWORD flags;
  29. } Mapping;
  30. class CMetaKey;
  31. class CMappings : public std::map<CString, Mapping>
  32. {
  33. public:
  34. CMappings()
  35. {
  36. }
  37. ~CMappings()
  38. {
  39. }
  40. HRESULT Load(CMetaKey * pKey);
  41. HRESULT Save(CMetaKey * pKey);
  42. BOOL m_fInherited;
  43. std::vector<CString> m_initData;
  44. };
  45. #define SET_MODIFIED(x)\
  46. m_pData->m_Dirty = (x);\
  47. SetModified(m_pData->m_Dirty)
  48. #define APPLY_DATA()\
  49. if (SUCCEEDED(m_pData->Save()))\
  50. CancelToClose()
  51. class CAppPropSheet;
  52. class CAppData
  53. {
  54. public:
  55. CAppData()
  56. : m_fIsLocal(TRUE),
  57. m_Dirty(FALSE)
  58. {
  59. }
  60. ~CAppData()
  61. {
  62. }
  63. BOOL IsMasterInstance();
  64. BOOL IsLocal() {return m_fIsLocal;}
  65. WORD MajorVersion();
  66. WORD MinorVersion();
  67. HRESULT Load();
  68. HRESULT Save();
  69. CString m_ServerName;
  70. CString m_UserName;
  71. CString m_UserPassword;
  72. CString m_MetaPath;
  73. CString m_HelpPath;
  74. BOOL m_fIsLocal;
  75. BOOL m_Dirty;
  76. int m_AppIsolated; //MD_APP_ISOLATED
  77. BOOL m_EnableSession; //MD_ASP_ALLOWSESSIONSTATE
  78. BOOL m_EnableBuffering; //MD_ASP_BUFFERINGON
  79. BOOL m_EnableParents; //MD_ASP_ENABLEPARENTPATHS
  80. int m_SessionTimeout; //MD_ASP_SESSIONTIMEOUT
  81. int m_ScriptTimeout; //MD_ASP_SCRIPTTIMEOUT
  82. TCHAR m_Languages[MAX_PATH]; //MD_ASP_SCRIPTLANGUAGE
  83. BOOL m_ServerDebug; //MD_ASP_ENABLESERVERDEBUG
  84. BOOL m_ClientDebug; //MD_ASP_ENABLECLIENTDEBUG
  85. BOOL m_SendAspError; //MD_ASP_SCRIPTERRORSSENTTOBROWSER
  86. TCHAR m_DefaultError[MAX_PATH]; //MD_ASP_SCRIPTERRORMESSAGE
  87. BOOL m_CacheISAPI; //MD_CACHE_EXTENSIONS
  88. BOOL m_LogFailures; //MD_ASP_LOGERRORREQUESTS
  89. BOOL m_DebugExcept; //MD_ASP_EXCEPTIONCATCHENABLE
  90. int m_CgiTimeout; //MD_SCRIPT_TIMEOUT
  91. BOOL m_NoCache; //
  92. BOOL m_UnlimCache; //
  93. BOOL m_LimCache; //
  94. int m_AspScriptFileCacheSize;
  95. int m_AspMaxDiskTemplateCacheFiles;
  96. int m_UnlimCacheInMemorySize; //MD_ASP_SCRIPTFILECACHESIZE
  97. int m_LimCacheInMemorySize; //MD_ASP_SCRIPTFILECACHESIZE
  98. int m_TotalCacheSize; //MD_ASP_MAXDISKTEMPLATECACHESIZE
  99. TCHAR m_DiskCacheDir[MAX_PATH]; //MD_ASP_DISKTEMPLATECACHEDIRECTORY
  100. int m_ScriptEngCacheMax; //MD_ASP_SCRIPTENGINECACHEMAX
  101. CMappings m_Mappings; //
  102. DWORD m_dwVersion;
  103. BOOL m_fCompatMode;
  104. CAppPropSheet * m_pSheet;
  105. };
  106. class CAppPropSheet : public WTL::CPropertySheet
  107. {
  108. public:
  109. CAppPropSheet();
  110. ~CAppPropSheet()
  111. {
  112. }
  113. BEGIN_MSG_MAP_EX(CAppPropSheet)
  114. MSG_WM_INITDIALOG(OnInitDialog)
  115. MSG_WM_KEYDOWN(OnKeyDown)
  116. END_MSG_MAP()
  117. LRESULT OnInitDialog(HWND hDlg, LPARAM lParam);
  118. void OnKeyDown(UINT nChar, UINT nRepCnt, UINT hFlags);
  119. };
  120. BOOL PathIsValid(LPCTSTR path);
  121. #endif //_PROP_SHEET_H