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.

37 lines
813 B

  1. #pragma once
  2. #include "device.h"
  3. class CDeviceEnum:
  4. public CComObjectRoot,
  5. public IMDSPEnumDevice
  6. {
  7. public:
  8. CDeviceEnum();
  9. public:
  10. BEGIN_COM_MAP(CDeviceEnum)
  11. COM_INTERFACE_ENTRY(IMDSPEnumDevice)
  12. END_COM_MAP()
  13. public:
  14. void FinalRelease();
  15. HRESULT Init( CComDevice **rgDevice, UINT cItems, UINT iCur = 0 );
  16. public:
  17. //
  18. // IMDSPEnumDevice interface
  19. //
  20. STDMETHOD( Next )( ULONG celt, IMDSPDevice ** ppDevice, ULONG *pceltFetched );
  21. STDMETHOD( Skip )( ULONG celt, ULONG *pceltFetched );
  22. STDMETHOD( Reset )( void );
  23. STDMETHOD( Clone )( IMDSPEnumDevice ** ppEnumDevice );
  24. protected:
  25. UINT m_iCurItem;
  26. UINT m_cItems;
  27. CComDevice **m_rgDevices;
  28. };
  29. typedef CComObject<CDeviceEnum> CComEnumDevice;