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.

154 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. handle.h
  5. Abstract:
  6. Header which defines the context handle structure.
  7. Author:
  8. Rita Wong (ritaw) 18-Feb-1993
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _NW_HANDLE_INLUDED_
  14. #define _NW_HANDLE_INLUDED_
  15. //
  16. // Signature value in handle
  17. //
  18. #define NW_HANDLE_SIGNATURE 0x77442323
  19. //
  20. // Flags used to indicate whether Context Handles are using NDS or not
  21. //
  22. #define CURRENTLY_ENUMERATING_NON_NDS 0
  23. #define CURRENTLY_ENUMERATING_NDS 1
  24. //
  25. // Context handle type
  26. //
  27. typedef enum _NW_ENUM_TYPE {
  28. NwsHandleListConnections = 10,
  29. NwsHandleListContextInfo_Tree,
  30. NwsHandleListContextInfo_Server,
  31. NwsHandleListServersAndNdsTrees,
  32. NwsHandleListVolumes,
  33. NwsHandleListQueues,
  34. NwsHandleListVolumesQueues,
  35. NwsHandleListDirectories,
  36. NwsHandleListPrintServers,
  37. NwsHandleListPrintQueues,
  38. NwsHandleListNdsSubTrees_Disk,
  39. NwsHandleListNdsSubTrees_Print,
  40. NwsHandleListNdsSubTrees_Any
  41. } NW_ENUM_TYPE, *PNW_ENUM_TYPE;
  42. //
  43. // Data associated with each opened context handle
  44. //
  45. typedef struct _NW_ENUM_CONTEXT {
  46. //
  47. // For block identification
  48. //
  49. DWORD Signature;
  50. //
  51. // Handle type
  52. //
  53. NW_ENUM_TYPE HandleType;
  54. //
  55. // Resume ID. This may be the identifier for the next entry
  56. // to list or may be the last entry listed for the connection handle
  57. // indicated by the flag dwUsingNds.
  58. //
  59. DWORD_PTR ResumeId;
  60. //
  61. // Type of object requested. Valid only when the handle type
  62. // is NwsHandleListConnections.
  63. //
  64. DWORD ConnectionType;
  65. //
  66. // Internal handle to the object we have opened to perform
  67. // the enumeration. This value exists only if the handle
  68. // type is NwsHandleListVolumes, NwsHandleListDirectories,
  69. // or NwsHandleListNdsSubTrees.
  70. //
  71. HANDLE TreeConnectionHandle;
  72. //
  73. // Value used to indicate the maximum number of volumes supported on
  74. // a server. This is used for connection handles that enumerate volumes
  75. // or volumes and queues (NwsHandleListVolumes or
  76. // NwsHandleListVolumesQueues).
  77. //
  78. DWORD dwMaxVolumes;
  79. //
  80. // Flag used to indicate whether enumeration ResumeId is for
  81. // NDS trees or servers.
  82. //
  83. DWORD dwUsingNds;
  84. //
  85. // Object identifier for NDS tree enumeration. The Oid of the
  86. // container/oject in the path of ContainerName.
  87. //
  88. DWORD dwOid;
  89. //
  90. // The size of the buffer used for caching rdr data under enumeration.
  91. //
  92. DWORD NdsRawDataSize;
  93. //
  94. // The object identifier of the last object read from the rdr that was
  95. // put into the local cache buffer NdsRawDataBuffer.
  96. //
  97. DWORD NdsRawDataId;
  98. //
  99. // The number of objects currently in the local cache buffer NdsRawDataBuffer.
  100. //
  101. DWORD NdsRawDataCount;
  102. //
  103. // The local cache buffer used for rdr data enumeration.
  104. //
  105. DWORD_PTR NdsRawDataBuffer;
  106. //
  107. // Full path name of the container object we are enumerating
  108. // from.
  109. //
  110. // For NwsHandleListVolumes handle type this string points to:
  111. // "\\ServerName"
  112. //
  113. // For NwsHandleListDirectories handle type this string points to:
  114. // "\\ServerName\Volume\"
  115. // or
  116. // "\\ServerName\Volume\Directory\"
  117. //
  118. WCHAR ContainerName[1];
  119. } NW_ENUM_CONTEXT, *LPNW_ENUM_CONTEXT;
  120. #endif // _NW_HANDLE_INLUDED_