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.

42 lines
1.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // HW Event Handler Enum
  3. ///////////////////////////////////////////////////////////////////////////////
  4. #ifndef _SETENUM_H
  5. #define _SETENUM_H
  6. #include "unk.h"
  7. #include "misc.h"
  8. #include <shpriv.h>
  9. class CEnumAutoplayHandlerImpl : public CCOMBase, public IEnumAutoplayHandler
  10. {
  11. public:
  12. // Interface IEnumAutoplayHandler
  13. STDMETHODIMP Next(LPWSTR* ppszHandler, LPWSTR* ppszAction,
  14. LPWSTR* ppszProvider, LPWSTR* ppszIconLocation);
  15. public:
  16. HRESULT _Init(LPWSTR pszEventHandler);
  17. CEnumAutoplayHandlerImpl();
  18. ~CEnumAutoplayHandlerImpl();
  19. private:
  20. HRESULT _SwapHandlerKeyInfo(DWORD dwLeft, DWORD dwRight);
  21. HRESULT _SortHandlers();
  22. private:
  23. struct _HANDLERKEYINFO
  24. {
  25. WCHAR szHandler[MAX_HANDLER];
  26. FILETIME ftLastWriteTime;
  27. };
  28. DWORD _dwIndex;
  29. DWORD _cHandlers;
  30. _HANDLERKEYINFO* _rghkiHandlers;
  31. BOOL _fTakeNoActionDone;
  32. };
  33. typedef CUnkTmpl<CEnumAutoplayHandlerImpl> CEnumAutoplayHandler;
  34. #endif // _SETENUM_H