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.

61 lines
1.2 KiB

  1. //
  2. // enumsrvmru.h: IEnumStr for the server MRU. Used by autocomplete
  3. //
  4. // Copyright Microsoft Corporation 2000
  5. #ifndef _enumsrvmru_h_
  6. #define _enumsrvmru_h_
  7. #include "sh.h"
  8. #include "objidl.h"
  9. class CTscSettings;
  10. class CEnumSrvMru : public IEnumString
  11. {
  12. public:
  13. CEnumSrvMru()
  14. : _iCurrEnum(0),
  15. _refCount(1)
  16. {
  17. }
  18. //
  19. // IUnknown methods.
  20. //
  21. STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppiuk );
  22. STDMETHOD_(ULONG, AddRef) ();
  23. STDMETHOD_(ULONG, Release)();
  24. //
  25. // IEnumString methods.
  26. //
  27. STDMETHOD(Next) (
  28. ULONG celt,
  29. LPOLESTR *rgelt,
  30. ULONG *pceltFetched);
  31. STDMETHOD(Skip)(ULONG celt);
  32. STDMETHOD(Reset) (void)
  33. {
  34. _iCurrEnum = 0;
  35. return S_OK;
  36. }
  37. STDMETHOD(Clone) (
  38. IEnumString ** ppenum);
  39. //
  40. // Private methods
  41. //
  42. BOOL InitializeFromTscSetMru( CTscSettings* pTscSet);
  43. private:
  44. long _refCount;
  45. // WCHAR versions of strings in server MRU list
  46. WCHAR _szMRU[SH_NUM_SERVER_MRU][SH_MAX_ADDRESS_LENGTH];
  47. ULONG _iCurrEnum; // Current enumeration context
  48. };
  49. #endif //_enumsrvmru_h_