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.

41 lines
1.3 KiB

  1. #ifndef CIconTask_h
  2. #define CIconTask_h
  3. #include <runtask.h>
  4. typedef void (*PFNICONTASKBALLBACK)(LPVOID pvData, UINT uId, UINT iIconIndex);
  5. class CIconTask : public CRunnableTask
  6. {
  7. public:
  8. #if 0 // Needed if we implement multiple interfaces
  9. // IUnknown methods
  10. virtual STDMETHODIMP_(ULONG) AddRef(void)
  11. { return CRunnableTask::AddRef(); };
  12. virtual STDMETHODIMP_(ULONG) Release(void)
  13. { return CRunnableTask::Release(); };
  14. virtual STDMETHODIMP QueryInterface(REFIID riid, void ** ppvObj)
  15. { return CRunnableTask::QueryInterface(riid, ppvObj); };
  16. #endif
  17. // IRunnableTask methods (override)
  18. virtual STDMETHODIMP RunInitRT(void);
  19. CIconTask(LPITEMIDLIST pidl, PFNICONTASKBALLBACK pfn, LPVOID pvData, UINT uId);
  20. private:
  21. virtual ~CIconTask();
  22. LPITEMIDLIST _pidl;
  23. PFNICONTASKBALLBACK _pfn;
  24. LPVOID _pvData;
  25. UINT _uId;
  26. };
  27. // NOTE: If you pass NULL for psf and pidlFolder, you must pass a full pidl which
  28. // the API takes ownership of. (This is an optimization) lamadio - 7.28.98
  29. HRESULT AddIconTask(IShellTaskScheduler* pts, IShellFolder* psf, LPCITEMIDLIST pidlFolder,
  30. LPCITEMIDLIST pidl, PFNICONTASKBALLBACK pfn, LPVOID pvData, UINT uId,
  31. int* piTempIcon);
  32. #endif