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.

149 lines
6.8 KiB

  1. #ifndef _MDENTRY_H_
  2. #define _MDENTRY_H_
  3. #define METABASE_USE_DEFAULT 0xFFFFFFFF
  4. class CDWord : public CObject
  5. {
  6. protected:
  7. DWORD m_dwData;
  8. public:
  9. CDWord(DWORD dwData) { m_dwData = dwData; }
  10. ~CDWord() {};
  11. operator DWORD () { return m_dwData; }
  12. };
  13. // fMigrate, fKeepOldReg, hRegRootKey, szRegSubKey, szRegValueName,
  14. // szMDPath, dwMDId, dwMDAttr, dwMDuType, dwMDdType, dwMDDataLen, szMDData
  15. typedef struct _MDEntry {
  16. LPTSTR szMDPath;
  17. DWORD dwMDIdentifier;
  18. DWORD dwMDAttributes;
  19. DWORD dwMDUserType;
  20. DWORD dwMDDataType;
  21. DWORD dwMDDataLen;
  22. LPBYTE pbMDData;
  23. } MDEntry;
  24. DWORD atodw(LPCTSTR lpszData);
  25. BOOL SplitLine(LPTSTR szLine, INT iExpectedNumOfFields);
  26. INT GetMDEntryFromInfLine(LPTSTR szLine, MDEntry *pMDEntry);
  27. int WWW_Upgrade_RegToMetabase(HINF hInf);
  28. int FTP_Upgrade_RegToMetabase(HINF hInf);
  29. void CreateWWWVRMap(CMapStringToOb *pMap);
  30. void CreateFTPVRMap(CMapStringToOb *pMap);
  31. void EmptyMap(CMapStringToOb *pMap);
  32. void AddVRootsToMD(LPCTSTR szSvcName);
  33. void AddVRMapToMD(LPCTSTR szSvcName, CMapStringToOb *pMap);
  34. int GetPortNum(LPCTSTR szSvcName);
  35. void ApplyGlobalToMDVRootTree(CString csKeyPath, CMapStringToString *pGlobalObj);
  36. void AddMDVRootTree(CString csKeyPath, CString csName, CString csValue, LPCTSTR pszIP, UINT nProgressBarTextWebInstance);
  37. void CreateMDVRootTree(CString csKeyPath, CString csName, CString csValue, LPCTSTR pszIP);
  38. void SplitVRString(CString csValue, LPTSTR szPath, LPTSTR szUserName, DWORD *pdwPerm);
  39. UINT GetInstNumber(LPCTSTR szMDPath, UINT i);
  40. int MigrateInfSectionToMD(HINF hInf, LPCTSTR szSection);
  41. BOOL CreateMimeMapFromRegistry(CMapStringToString *pMap);
  42. BOOL CreateMimeMapFromInfSection(CMapStringToString *pMap, HINF hFile, LPCTSTR szSection);
  43. void ReadMimeMapFromInfSection(CMapStringToString *pMap, HINF hFile, LPCTSTR szSection, BOOL fAction);
  44. void SetLogPlugInOrder(LPCTSTR lpszSvc);
  45. DWORD GetSizeBasedOnMetaType(DWORD dwDataType,LPTSTR szString);
  46. BOOL MDEntry_MoveValue(LPTSTR szLine);
  47. void ReadMultiSZFromInfSection(CString *pcsMultiSZ, HINF hFile, LPCTSTR szSection);
  48. void ReadMimeMapFromMetabase(CMapStringToString *pMap);
  49. void IntegrateNewErrorsOnUpgrade( IN HINF hFile, IN LPCTSTR szSection );
  50. BOOL ConfirmLocalHost(LPCTSTR lpszVirtServer);
  51. void RemoveCannotDeleteVR( LPCTSTR pszService );
  52. void UpdateVDCustomErrors();
  53. DWORD UpgradeCryptoKeys(void);
  54. DWORD SetMDEntry(MDEntry *pMDEntry);
  55. DWORD SetMDEntry_NoOverWrite(MDEntry *pMDEntry);
  56. DWORD SetMDEntry_Wrap(MDEntry *pMDEntry);
  57. void UpgradeFilters(CString csTheSection);
  58. DWORD VerifyMD_Filters_WWW(TSTR &strTheSection);
  59. DWORD WriteToMD_Filters_WWW(TSTR &strTheSection);
  60. DWORD WriteToMD_Filters_List_Entry(CString csOrder);
  61. DWORD WriteToMD_Filter_Entry(CString csFilter_Name, CString csFilter_Path);
  62. BOOL VerifyMD_InProcessISAPIApps_WWW(IN LPCTSTR szSection);
  63. DWORD WriteToMD_InProcessISAPIApps_WWW(IN LPCTSTR szSection);
  64. DWORD WriteToMD_ISAPI_Entry( TSTR_MSZ &mstrInprocIsapiList );
  65. DWORD WriteToMD_NTAuthenticationProviders_WWW(void);
  66. DWORD VerifyMD_NTAuthenticationProviders_WWW(void);
  67. DWORD WriteToMD_NTAuthenticationProviders_WWW(CString);
  68. DWORD WriteToMD_Capabilities(LPCTSTR lpszSvc);
  69. UINT AddVirtualServer( LPCTSTR szSvcName, UINT i, CMapStringToString *pObj, CString& csRoot, CString& csIP);
  70. void CreateMDVRootTree(CString csKeyPath, CString csName, CString csValue, LPCTSTR pszIP, UINT nProgressBarTextWebInstance);
  71. int VerifyVRoots(LPCTSTR szSvcName);
  72. DWORD WriteToMD_CertMapper(CString csKeyPath);
  73. DWORD WriteToMD_AdminInstance(CString csKeyPath,CString& csInstNumber);
  74. DWORD WriteToMD_Authorization(CString csKeyPath, DWORD dwValue);
  75. DWORD WriteToMD_IIsWebServerInstance_WWW(CString csKeyPath);
  76. DWORD WriteToMD_NotDeleteAble(CString csKeyPath);
  77. DWORD WriteToMD_ServerSize(CString csKeyPath);
  78. DWORD WriteToMD_ServerComment(CString csKeyPath, UINT iCommentID);
  79. DWORD WriteToMD_ServerBindings_HTMLA(CString csKeyPath, UINT iPort);
  80. DWORD HandleSecurityTemplates(LPCTSTR szSvcName);
  81. DWORD WriteToMD_IPsec_GrantByDefault(CString csKeyPath);
  82. DWORD WriteToMD_HttpExpires(CString csData);
  83. DWORD WriteToMD_AnonymousOnly_FTP(CString csKeyPath);
  84. DWORD WriteToMD_AllowAnonymous_FTP(CString csKeyPath);
  85. DWORD WriteToMD_AnonymousUserName_FTP(int iUpgradeScenarioSoOnlyOverWriteIfAlreadyThere);
  86. DWORD WriteToMD_AnonymousUserName_WWW(int iUpgradeScenarioSoOnlyOverWriteIfAlreadyThere);
  87. int AddRequiredISAPI(CStringArray& arrayName,CStringArray& arrayPath,IN LPCTSTR szSection);
  88. BOOL ChkMdEntry_Exist(MDEntry *pMDEntry);
  89. DWORD WriteToMD_IWamUserName_WWW(void);
  90. DWORD WriteToMD_CustomError_Entry(CString csKeyPath, CString csCustomErrorDelimitedList);
  91. BOOL VerifyCustomErrors_WWW(CString csKeyPath);
  92. void MoveOldHelpFilesToNewLocation(void);
  93. DWORD DeleteMDEntry(MDEntry *pMDEntry);
  94. void WriteToMD_ForceMetabaseToWriteToDisk(void);
  95. void VerifyMD_DefaultLoadFile_WWW(IN LPCTSTR szSection, CString csKeyPath);
  96. INT Register_iis_www_handleScriptMap(void);
  97. DWORD DoesAdminACLExist(CString csKeyPath);
  98. int ReOrderFiltersSpecial(int nArrayItems, CStringArray& arrayName, CString& csOrder);
  99. void AddFilter1ToFirstPosition(CString& csOrder,LPTSTR szFilter1);
  100. void AddFilter1AfterFilter2(CString& csOrder,LPTSTR szFilter1,LPTSTR szFilter2);
  101. void GetScriptMapListFromClean(ScriptMapNode *pList, IN LPCTSTR szSection);
  102. int RemoveMetabaseFilter(TCHAR * szFilterName, int iRemoveMetabaseNodes);
  103. DWORD WriteToMD_IDRegistration(CString csKeyPath);
  104. DWORD WriteToMD_AspCodepage(CString csKeyPath, DWORD dwValue, int iOverWriteAlways);
  105. DWORD WriteToMD_HttpCustom(CString csKeyPath, CString csData, int iOverWriteAlways);
  106. DWORD WriteToMD_EnableParentPaths_WWW(CString csKeyPath, BOOL bEnableFlag);
  107. void EnforceMaxConnections(void);
  108. DWORD WriteToMD_DwordEntry(CString csKeyPath,DWORD dwID,DWORD dwAttrib,DWORD dwUserType,DWORD dwTheData,INT iOverwriteFlag);
  109. int RemoveIncompatibleMetabaseFilters(LPTSTR szSectionName,int iRemoveMetabaseNodes);
  110. DWORD WriteToMD_RootKeyType(void);
  111. DWORD MDDumpAdminACL(CString csKeyPath);
  112. int DoesAppIsolatedExist(CString csKeyPath);
  113. HRESULT WINAPI Add_WWW_VDirW(WCHAR * pwszMetabasePath, WCHAR * pwszVDirName,WCHAR * pwszPhysicalPath, DWORD dwPermissions, DWORD iApplicationType);
  114. HRESULT WINAPI Add_WWW_VDirA(CHAR * pwszMetabasePath, CHAR * pwszVDirName,CHAR * pwszPhysicalPath, DWORD dwPermissions, DWORD iApplicationType);
  115. HRESULT WINAPI Remove_WWW_VDirW(WCHAR * pwszMetabasePath, WCHAR * pwszVDirName);
  116. HRESULT WINAPI Remove_WWW_VDirA(CHAR * pwszMetabasePath, CHAR * pwszVDirName);
  117. HRESULT AddVirtualDir(IMSAdminBase *pIMSAdminBase,WCHAR * pwszMetabasePath,WCHAR * pwszVDir,WCHAR * pwszPhysicalPath, DWORD dwPermissions, INT iApplicationType);
  118. HRESULT RemoveVirtualDir(IMSAdminBase *pIMSAdminBase,WCHAR * wszMetabaseKey,WCHAR * wszVDir);
  119. #endif // _MDENTRY_H_