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.

157 lines
3.3 KiB

  1. class FAR CWinNTComputerEnum : public CWinNTEnumVariant
  2. {
  3. public:
  4. CWinNTComputerEnum(ObjectTypeList ObjList);
  5. CWinNTComputerEnum();
  6. ~CWinNTComputerEnum();
  7. HRESULT EnumObjects(ULONG cElements,
  8. VARIANT FAR * pvar,
  9. ULONG FAR * pcElementFetched);
  10. static
  11. HRESULT
  12. CWinNTComputerEnum::Create(
  13. CWinNTComputerEnum FAR* FAR* ppenumvariant,
  14. BSTR ADsPath,
  15. BSTR DomainName,
  16. BSTR ComputerName,
  17. VARIANT var,
  18. CWinNTCredentials& Credentials
  19. );
  20. private:
  21. ObjectTypeList FAR *_pObjList;
  22. LPBYTE _pBuffer;
  23. DWORD _dwObjectReturned;
  24. DWORD _dwObjectCurrentEntry;
  25. DWORD _dwObjectTotal;
  26. BOOL _bNoMore;
  27. DWORD _dwIndex;
  28. HANDLE _hGGroupComputer;
  29. HANDLE _hLGroupComputer;
  30. DWORD _dwGroupArrayIndex;
  31. LPBYTE _pPrinterBuffer;
  32. DWORD _dwPrinterObjectReturned;
  33. DWORD _dwPrinterObjectCurrentEntry;
  34. DWORD _dwPrinterObjectTotal;
  35. BOOL _fPrinterNoMore;
  36. LPBYTE _pServiceBuffer;
  37. DWORD _dwServiceObjectReturned;
  38. DWORD _dwServiceObjectCurrentEntry;
  39. DWORD _dwServiceObjectTotal;
  40. BOOL _fServiceNoMore;
  41. BSTR _ComputerName;
  42. BSTR _ADsPath;
  43. BSTR _DomainName;
  44. CWinNTCredentials _Credentials;
  45. HRESULT
  46. CWinNTComputerEnum::GetUserObject(IDispatch ** ppDispatch);
  47. HRESULT
  48. CWinNTComputerEnum::GetGroupObject(IDispatch ** ppDispatch);
  49. HRESULT
  50. CWinNTComputerEnum::GetPrinterObject(IDispatch ** ppDispatch);
  51. HRESULT
  52. CWinNTComputerEnum::GetServiceObject(IDispatch ** ppDispatch);
  53. HRESULT
  54. EnumUsers(
  55. ULONG cElements,
  56. VARIANT FAR* pvar,
  57. ULONG FAR* pcElementFetched
  58. );
  59. HRESULT
  60. EnumPrintQueues(
  61. ULONG cElements,
  62. VARIANT FAR* pvar,
  63. ULONG FAR* pcElementFetched
  64. );
  65. HRESULT
  66. EnumServices(
  67. ULONG cElements,
  68. VARIANT FAR* pvar,
  69. ULONG FAR* pcElementFetched
  70. );
  71. HRESULT
  72. CWinNTComputerEnum::GetLocalGroupObject(
  73. IDispatch ** ppDispatch
  74. );
  75. HRESULT
  76. CWinNTComputerEnum::GetGlobalGroupObject(
  77. IDispatch ** ppDispatch
  78. );
  79. HRESULT
  80. EnumComputers(
  81. ULONG cElements,
  82. VARIANT FAR* pvar,
  83. ULONG FAR* pcElementFetched
  84. );
  85. HRESULT
  86. EnumGroups(
  87. ULONG cElements,
  88. VARIANT FAR* pvar,
  89. ULONG FAR* pcElementFetched
  90. );
  91. HRESULT
  92. CWinNTComputerEnum::EnumGroupObjects(
  93. DWORD ObjectType,
  94. ULONG cElements,
  95. VARIANT FAR * pvar,
  96. ULONG FAR * pcElementFetched
  97. );
  98. HRESULT
  99. CWinNTComputerEnum::EnumGlobalGroups(
  100. ULONG cElements,
  101. VARIANT FAR* pvar,
  102. ULONG FAR* pcElementFetched
  103. );
  104. HRESULT
  105. CWinNTComputerEnum::EnumLocalGroups(
  106. ULONG cElements,
  107. VARIANT FAR* pvar,
  108. ULONG FAR* pcElementFetched
  109. );
  110. HRESULT
  111. EnumObjects(
  112. DWORD ObjectType,
  113. ULONG cElements,
  114. VARIANT FAR * pvar,
  115. ULONG FAR * pcElementFetched
  116. );
  117. STDMETHOD(Next)(
  118. ULONG cElements,
  119. VARIANT FAR* pvar,
  120. ULONG FAR* pcElementFetched
  121. );
  122. };