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.

120 lines
3.2 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1992, Microsoft Corporation.
  4. //
  5. // File: enumnode.hxx
  6. //
  7. // Contents: This has the definitions for the Classes that are used in order
  8. // to support the enumeration functions of the Dfs provider.
  9. //
  10. // Classes: CDfsEnumNode
  11. // CDfsEnumHandleTable
  12. //
  13. // History: 20-June-1994 SudK Created.
  14. //
  15. //-----------------------------------------------------------------------------
  16. #ifndef _DFS_ENUM_NODE_HXX_
  17. #define _DFS_ENUM_NODE_HXX_
  18. DWORD DfsEnumEnterCriticalSection(VOID);
  19. VOID DfsEnumLeaveCriticalSection(VOID);
  20. DWORD InitDfsEnum(VOID);
  21. VOID TermDfsEnum(VOID);
  22. //--------------------------------------------------------------------------
  23. //
  24. // Class: CDfsEnumNode
  25. //
  26. // Synopsis: This is a wrapper class used to instantiate an enumeration
  27. // in progress (to which a handle has been handed out).
  28. //
  29. // Methods: QueryType -
  30. // QueryScope -
  31. // QueryUsage -
  32. // GetNetResource -
  33. //
  34. // History: 20 June 1994 SudK Created.
  35. //
  36. //--------------------------------------------------------------------------
  37. class CDfsEnumNode
  38. {
  39. public:
  40. CDfsEnumNode( DWORD dwScope,
  41. DWORD dwType,
  42. DWORD dwUsage);
  43. virtual ~CDfsEnumNode();
  44. virtual DWORD Init() = 0;
  45. virtual DWORD GetNetResource(LPVOID lpBuffer,
  46. LPDWORD lpBufferSize) = 0;
  47. DWORD QueryType()
  48. { return _dwType; }
  49. DWORD QueryScope()
  50. { return _dwScope; }
  51. DWORD QueryUsage()
  52. { return _dwUsage; }
  53. private:
  54. DWORD _dwType;
  55. DWORD _dwScope;
  56. DWORD _dwUsage;
  57. };
  58. //--------------------------------------------------------------------------
  59. //
  60. // Class: CDfsEnumConnectedNode
  61. //
  62. // Synopsis: This is a wrapper class used to instantiate an enumeration
  63. // of domains in progress (to which a handle has been handed out).
  64. //
  65. // Methods:
  66. // Init -
  67. // GetNetResource -
  68. //
  69. // History: 18 Jan 1996 BruceFo Created.
  70. //
  71. //--------------------------------------------------------------------------
  72. #define ECN_INITIAL_BUFFER_SIZE 1024
  73. class CDfsEnumConnectedNode : public CDfsEnumNode
  74. {
  75. public:
  76. CDfsEnumConnectedNode(DWORD dwScope,
  77. DWORD dwType,
  78. DWORD dwUsage,
  79. LPCTSTR pszProviderName,
  80. const LPNETRESOURCE lpNetResource );
  81. ~CDfsEnumConnectedNode();
  82. virtual DWORD Init();
  83. virtual DWORD GetNetResource(
  84. LPVOID lpBuffer,
  85. LPDWORD lpBufferSize);
  86. private:
  87. DWORD _iNext;
  88. DWORD _cTotal;
  89. LPNETRESOURCE _lpNetResource;
  90. BYTE _buffer[ECN_INITIAL_BUFFER_SIZE];
  91. LPWSTR PackString(
  92. IN LPVOID pBuffer,
  93. IN LPCWSTR wszString,
  94. IN DWORD cbString,
  95. IN OUT LPDWORD lpcbBuf);
  96. };
  97. #endif