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.

104 lines
2.3 KiB

  1. typedef struct _DFS_LINKROOT_ENUM_INFO {
  2. LPWSTR GuidString;
  3. UNICODE_STRING Name;
  4. } DFS_LINKROOT_ENUM_INFO, *PDFS_LINKROOT_ENUM_INFO;
  5. typedef struct _DFS_LINK_ENUMERATION {
  6. int NumberOfLinks;
  7. DFS_LINKROOT_ENUM_INFO Info[];
  8. } DFS_LINK_ENUMERATION, *PDFS_LINK_ENUMERATION;
  9. typedef struct _DFS_ROOT_ENUMERATION {
  10. int NumberOfRoots;
  11. DFS_LINKROOT_ENUM_INFO Info[];
  12. } DFS_ROOT_ENUMERATION, *PDFS_ROOT_ENUMERATION;
  13. typedef struct _DFS_ADSI_REPLICA_LIST {
  14. PUNICODE_STRING pServerName;
  15. PUNICODE_STRING pShareName;
  16. struct _DFS_ADSI_REPLICA_LIST *pNext;
  17. } DFS_ADSI_REPLICA_LIST, *PDFS_ADSI_REPLICA_LIST;
  18. typedef struct _DFS_ADSI_ROOT {
  19. LPWSTR GuidString;
  20. PDFS_ADSI_REPLICA_LIST Replicas;
  21. } DFS_ADSI_ROOT, *PDFS_ADSI_ROOT;
  22. typedef struct _DFS_ADSI_LINK {
  23. LPWSTR GuidString;
  24. PDFS_ADSI_REPLICA_LIST Replicas;
  25. } DFS_ADSI_LINK, *PDFS_ADSI_LINK;
  26. DFSSTATUS
  27. DfsAdsiGetRoot(
  28. LPWSTR Namespace,
  29. PDFS_ADSI_ROOT *ppAdRootObject
  30. );
  31. DFSSTATUS
  32. DfsAdsiGetLink(
  33. LPWSTR Namespace,
  34. PDFS_ADSI_LINK *ppAdLinkObject
  35. );
  36. DFSSTATUS
  37. DfsAdsiFreeRoot(
  38. PDFS_ADSI_ROOT pAdRootObject
  39. );
  40. DFSSTATUS
  41. DfsAdsiEnumerateLinks(
  42. LPWSTR Namespace,
  43. PDFS_LINK_ENUMERATION *ppLinks
  44. );
  45. DFSSTATUS
  46. DfsAdsiFreeLinkEnumeration(
  47. PDFS_LINK_ENUMERATION pLinks
  48. );
  49. DFSSTATUS
  50. DfsAdsiEnumerateRoots(
  51. LPWSTR Namespace,
  52. PDFS_ROOT_ENUMERATION *ppRoots
  53. );
  54. DFSSTATUS
  55. DfsAdsiFreeRootEnumeration(
  56. PDFS_ROOT_ENUMERATION pRoots
  57. );
  58. //
  59. // Macros for accessing ADSI structures
  60. //
  61. #define GET_GUID(Object) Object.DfsAdsiHeader.Guid
  62. #define GET_REPLICAS(Object) Object.Replicas
  63. #define GET_ROOT_NAME(Object) Object.RootName
  64. #define GET_LINK_NAME(LinkObject) LinkObject.LinkName
  65. #define GET_POLICY(Object) Object.Policy
  66. #define NUMBER_OF_LINKS(pLinkEnumeration) pLinkEnumeration->NumberOfLinks
  67. #define NUMBER_OF_ROOTS(pRootEnumeration) pRootEnumeration->NumberOfRoots
  68. #define LINK_GUID_STRING(pLink, index) pLink->Info[index].GuidString
  69. #define LINK_NAME(pLink, index) pLink->Info[index].Name
  70. #define ROOT_NAME(pLink, index) pLink->Info[index].Name.Buffer
  71. #define GET_ROOT_REPLICAS(pRoot) pRoot->Replicas
  72. #define GET_LINK_REPLICAS(pLink) pLink->Replicas