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.

34 lines
1.1 KiB

  1. #ifndef __APPSIZE_H_
  2. #define __APPSIZE_H_
  3. #include <runtask.h>
  4. // Folder size computation tree walker callback class
  5. class CAppFolderSize : public IShellTreeWalkerCallBack
  6. {
  7. public:
  8. CAppFolderSize(ULONGLONG * puSize);
  9. virtual ~CAppFolderSize();
  10. // *** IUnknown Methods
  11. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  12. virtual STDMETHODIMP_(ULONG) AddRef(void) ;
  13. virtual STDMETHODIMP_(ULONG) Release(void);
  14. // *** IShellTreeWalkerCallBack methods ***
  15. STDMETHODIMP FoundFile(LPCWSTR pwszFolder, TREEWALKERSTATS *ptws, WIN32_FIND_DATAW * pwfd);
  16. STDMETHODIMP EnterFolder(LPCWSTR pwszFolder, TREEWALKERSTATS *ptws, WIN32_FIND_DATAW * pwfd);
  17. STDMETHODIMP LeaveFolder(LPCWSTR pwszFolder, TREEWALKERSTATS *ptws);
  18. STDMETHODIMP HandleError(LPCWSTR pwszFolder, TREEWALKERSTATS *ptws, HRESULT hrError);
  19. // *** Initailze the IShellTreeWalker * by CoCreateInstacing it
  20. HRESULT Initialize();
  21. protected:
  22. ULONGLONG * _puSize;
  23. IShellTreeWalker * _pstw;
  24. UINT _cRef;
  25. HRESULT _hrCoInit;
  26. };
  27. #endif // _APPSIZE_H_