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.

144 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. iisutil.h
  5. Abstract:
  6. IIS Resource utility routine DLL
  7. Author:
  8. Pete Benoit (v-pbenoi) 12-SEP-1996
  9. Revision History:
  10. --*/
  11. #ifndef IISUTIL_H
  12. #define IISUTIL_H
  13. #define UNICODE 1
  14. #include "clusres.h"
  15. #include "wtypes.h"
  16. #include "inetinfo.h"
  17. #define IISLogEvent ClusResLogEvent
  18. #define IISSetResourceStatus ClusResSetResourceStatus
  19. // Define the Service Identifiers
  20. #define WWW_SERVICE 0
  21. #define FTP_SERVICE 1
  22. #define GOPHER_SERVICE 2
  23. #define MAX_SERVICE GOPHER_SERVICE + 1
  24. //
  25. // Define the resource Name
  26. //
  27. #define IIS_RESOURCE_NAME L"IIS Virtual Root"
  28. // Define some max values
  29. #define MAX_LENGTH_VIRTUAL_ROOT 256 // Length of VR
  30. #define MAX_LENGTH_ROOT_ADDR 80 // Address Length
  31. #define MAX_VIRTUAL_ROOT 200 // Max number of VR's
  32. #define MAX_INET_SERVER_START_DELAY 1000 // 1 Seconds
  33. #define SERVER_START_DELAY 500 // 500ms
  34. #define MAX_DEFAULT_WSTRING_SIZE 512 // Default string size
  35. #define MAX_IIS_RESOURCES 20 // Total number of IIS resources
  36. #define MAX_OPEN_RETRY 30 // 30 Retries (15 sec)
  37. #define MAX_ONLINE_RETRY 60 // 60 (30 sec)
  38. #define MAX_MUTEX_WAIT 10*1000 // 10 seconds
  39. #define IP_ADDRESS_RESOURCE_NAME L"IP Address"
  40. // Define parameters structure
  41. typedef struct _IIS_PARAMS {
  42. LPWSTR ServiceName;
  43. LPWSTR Alias;
  44. LPWSTR Directory;
  45. DWORD AccessMask;
  46. //BUGBUG
  47. // Remove AccountName Password for UNC physical directories
  48. // for the first release
  49. /*
  50. LPWSTR AccountName;
  51. LPWSTR Password;
  52. */
  53. } IIS_PARAMS, *PIIS_PARAMS;
  54. // Define the resource data structure
  55. typedef struct _IIS_RESOURCE {
  56. DWORD Index;
  57. LPWSTR ResourceName;
  58. IIS_PARAMS Params;
  59. // LPWSTR ServiceName;
  60. DWORD ServiceType;
  61. RESOURCE_HANDLE ResourceHandle;
  62. HKEY ParametersKey;
  63. LPINET_INFO_VIRTUAL_ROOT_ENTRY VirtualRoot;
  64. CLUS_WORKER OnlineThread;
  65. CLUS_WORKER OpenThread;
  66. CLUSTER_RESOURCE_STATE State;
  67. HRESOURCE hResource;
  68. } IIS_RESOURCE, *LPIIS_RESOURCE;
  69. DWORD
  70. OffLineVirtualRoot(
  71. IN LPIIS_RESOURCE ResourceEntry,
  72. IN PLOG_EVENT_ROUTINE LogEvent
  73. );
  74. DWORD
  75. OnLineVirtualRoot(
  76. IN LPIIS_RESOURCE ResourceEntry,
  77. IN PLOG_EVENT_ROUTINE LogEvent
  78. );
  79. VOID
  80. DestructVR(
  81. IN LPINET_INFO_VIRTUAL_ROOT_ENTRY vr
  82. );
  83. VOID
  84. DestructIISResource(
  85. IN LPIIS_RESOURCE ResourceEntry
  86. );
  87. VOID
  88. FreeVR(
  89. IN LPINET_INFO_VIRTUAL_ROOT_ENTRY vr
  90. );
  91. VOID
  92. FreeIISResource(
  93. IN LPIIS_RESOURCE ResourceEntry
  94. );
  95. BOOL
  96. VerifyIISService(
  97. IN LPIIS_RESOURCE ResourceEntry,
  98. IN BOOL IsAliveFlag,
  99. IN PLOG_EVENT_ROUTINE LogEvent
  100. );
  101. DWORD
  102. IISLoadMngtDll(
  103. );
  104. DWORD
  105. IsIISMngtDllLoaded(
  106. );
  107. VOID
  108. IISUnloadMngtDll(
  109. );
  110. #endif