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.

151 lines
3.2 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1997
  5. //
  6. // File: common.hxx
  7. //
  8. // Contents: Microsoft ADs IIS Common routines
  9. //
  10. // History: 28-Feb-97 SophiaC Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. #define MAX_DWORD 0xFFFFFFFF
  14. #define MAXCOMPONENTS 32
  15. #define TOKEN_IDENTIFIER 1
  16. #define TOKEN_COMMA 2
  17. #define TOKEN_BSLASH 3
  18. #define TOKEN_END 4
  19. #define TOKEN_DOMAIN 5
  20. #define TOKEN_USER 6
  21. #define TOKEN_GROUP 7
  22. #define TOKEN_PRINTER 8
  23. #define TOKEN_COMPUTER 9
  24. #define TOKEN_SERVICE 10
  25. #define TOKEN_ATSIGN 11
  26. #define TOKEN_EXCLAMATION 12
  27. #define TOKEN_COLON 13
  28. #define TOKEN_FSLASH 14
  29. #define TOKEN_PROVIDER 15
  30. #define TOKEN_FILESERVICE 16
  31. #define TOKEN_SCHEMA 17
  32. #define TOKEN_CLASS 18
  33. #define TOKEN_FUNCTIONALSET 19
  34. #define TOKEN_FUNCTIONALSETALIAS 20
  35. #define TOKEN_PROPERTY 21
  36. #define TOKEN_SYNTAX 22
  37. #define TOKEN_FILESHARE 23
  38. #define TOKEN_PERIOD 24
  39. #define TOKEN_EQUAL 25
  40. #define TOKEN_NAMESPACE 26
  41. #define TOKEN_TREE 27
  42. #define TOKEN_IISOBJECT 28
  43. //
  44. // Accessing Well-known object types
  45. //
  46. typedef struct _filters {
  47. WCHAR szObjectName[MAX_PATH];
  48. DWORD dwFilterId;
  49. } FILTERS, *PFILTERS;
  50. typedef struct _component {
  51. LPWSTR szComponent;
  52. LPWSTR szValue;
  53. }COMPONENT, *PCOMPONENT;
  54. typedef struct _objectinfo {
  55. LPWSTR ProviderName;
  56. LPWSTR TreeName;
  57. DWORD ObjectType;
  58. DWORD NumComponents;
  59. DWORD MaxComponents;
  60. PCOMPONENT ComponentArray;
  61. } OBJECTINFO, *POBJECTINFO;
  62. HRESULT
  63. AddComponent(
  64. POBJECTINFO pObjectInfo,
  65. LPWSTR szComponent,
  66. LPWSTR szValue
  67. );
  68. HRESULT
  69. AddProviderName(
  70. POBJECTINFO pObjectInfo,
  71. LPWSTR szToken
  72. );
  73. HRESULT
  74. BuildIISPathFromADsPath(
  75. POBJECTINFO pObjectInfo,
  76. LPWSTR pszIISPathName
  77. );
  78. VOID
  79. FreeObjectInfo(
  80. POBJECTINFO pObjectInfo
  81. );
  82. //
  83. // Get IIS Admin Base Object
  84. //
  85. HRESULT
  86. ReCacheAdminBase(
  87. IN LPWSTR pszServerName,
  88. IN OUT IMSAdminBase **ppAdminBase
  89. );
  90. HRESULT
  91. OpenAdminBaseKey(
  92. IN LPWSTR pszServerName,
  93. IN LPWSTR pszPathName,
  94. IN DWORD dwAccessType,
  95. IN OUT IMSAdminBase **ppAdminBase,
  96. OUT METADATA_HANDLE *phHandle
  97. );
  98. VOID
  99. CloseAdminBaseKey(
  100. IN IMSAdminBase *pAdminBase,
  101. IN METADATA_HANDLE hHandle
  102. );
  103. HRESULT
  104. InitAdminBase(
  105. IN LPWSTR pszServerName,
  106. OUT IMSAdminBase **ppAdminBase
  107. );
  108. VOID
  109. UninitAdminBase(
  110. IN IMSAdminBase *pAdminBase
  111. );
  112. HRESULT
  113. InitServerInfo(
  114. IN LPWSTR pszServerName,
  115. OUT IMSAdminBase **ppObject
  116. );
  117. HRESULT
  118. InitWamAdmin(
  119. IN LPWSTR pszServerName,
  120. OUT IWamAdmin2 **ppWamAdmin
  121. );
  122. VOID
  123. UninitWamAdmin(
  124. IN IWamAdmin2 *pWamAdmin
  125. );