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.

183 lines
4.0 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1997
  5. //
  6. // File: getobj.hxx
  7. //
  8. // Contents: ADSI GetObject functionality
  9. //
  10. // History: 25-Feb-97 SophiaC Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. #define MAXCOMPONENTS 32
  14. #define MAX_PROVIDER_TOKEN_LENGTH 10
  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. typedef struct _component {
  44. LPWSTR szComponent;
  45. LPWSTR szValue;
  46. }COMPONENT, *PCOMPONENT;
  47. typedef struct _objectinfo {
  48. LPWSTR ProviderName;
  49. LPWSTR TreeName;
  50. WCHAR ClassName[MAX_PATH+1];
  51. DWORD ObjectType;
  52. DWORD NumComponents;
  53. DWORD MaxComponents;
  54. PCOMPONENT ComponentArray;
  55. } OBJECTINFO, *POBJECTINFO;
  56. HRESULT
  57. RelativeGetObject(
  58. BSTR ADsPath,
  59. BSTR ClassName,
  60. BSTR RelativeName,
  61. CCredentials& Credentials,
  62. IDispatch * FAR* ppObject,
  63. BOOL bNamespaceRelative
  64. );
  65. HRESULT
  66. GetObject(
  67. LPWSTR szBuffer,
  68. CCredentials& Credentials,
  69. LPVOID * ppObject
  70. );
  71. HRESULT
  72. AddComponent(
  73. POBJECTINFO pObjectInfo,
  74. LPWSTR szComponent,
  75. LPWSTR szValue
  76. );
  77. HRESULT
  78. AddProviderName(
  79. POBJECTINFO pObjectInfo,
  80. LPWSTR szToken
  81. );
  82. HRESULT
  83. BuildIISPathFromADsPath(
  84. LPWSTR szADsPathName,
  85. LPWSTR* pszIISPathName
  86. );
  87. HRESULT
  88. BuildIISPathFromADsPath(
  89. POBJECTINFO pObjectInfo,
  90. LPWSTR pszIISPathName
  91. );
  92. HRESULT
  93. BuildADsParentPath(
  94. LPWSTR szBuffer,
  95. LPWSTR szParent,
  96. LPWSTR szCommonName
  97. );
  98. HRESULT
  99. BuildADsParentPath(
  100. POBJECTINFO pObjectInfo,
  101. LPWSTR szParent,
  102. LPWSTR szCommonName
  103. );
  104. VOID
  105. FreeObjectInfo(
  106. POBJECTINFO pObjectInfo
  107. );
  108. HRESULT
  109. GetNamespaceObject(
  110. POBJECTINFO pObjectInfo,
  111. CCredentials& Credentials,
  112. LPVOID * ppObject
  113. );
  114. HRESULT
  115. GetSchemaObject(
  116. POBJECTINFO pObjectInfo,
  117. IIsSchema * pSchemaCache,
  118. LPVOID * ppObject
  119. );
  120. HRESULT
  121. GetIntSchemaObject(
  122. POBJECTINFO pObjInfo,
  123. LPVOID * ppObject
  124. );
  125. HRESULT
  126. GetClassObject(
  127. POBJECTINFO pObjInfo,
  128. IIsSchema * pSchemaCache,
  129. LPVOID * ppObject
  130. );
  131. HRESULT
  132. GetSyntaxObject(
  133. POBJECTINFO pObjInfo,
  134. LPVOID * ppObject
  135. );
  136. HRESULT
  137. GetPropertyObject(
  138. POBJECTINFO pObjInfo,
  139. IIsSchema * pSchemaCache,
  140. LPVOID * ppObject
  141. );
  142. HRESULT
  143. ValidateObjectType(
  144. POBJECTINFO pObjectInfo
  145. );
  146. HRESULT
  147. ValidateProvider(
  148. POBJECTINFO pObjectInfo
  149. );
  150. HRESULT
  151. ValidateNamespaceObject(
  152. POBJECTINFO pObjectInfo
  153. );
  154. HRESULT
  155. ValidateSchemaObject(
  156. POBJECTINFO pObjectInfo,
  157. PDWORD pdwObjectType
  158. );