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.

77 lines
1.9 KiB

  1. // PropShellExt.h: Definition of the CPropShellExt class
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(_PROPSHELLEXT_H)
  5. #define _PROPSHELLEXT_H
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "resource.h" // main symbols
  10. #include "common.h"
  11. #include "mdkeys.h"
  12. #include "W3PropPage.h"
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CPropShellExt
  15. typedef ICopyHook IShellCopyHook;
  16. class CPropShellExt :
  17. public CComObjectRootEx<CComSingleThreadModel>,
  18. public CComCoClass<CPropShellExt,&CLSID_PropShellExt>,
  19. public IShellExtInit,
  20. public IShellPropSheetExt,
  21. public ICopyHook
  22. {
  23. public:
  24. CPropShellExt()
  25. {
  26. }
  27. BEGIN_COM_MAP(CPropShellExt)
  28. COM_INTERFACE_ENTRY(IShellExtInit)
  29. COM_INTERFACE_ENTRY(IShellPropSheetExt)
  30. COM_INTERFACE_ENTRY_IID(IID_IShellCopyHook, ICopyHook)
  31. END_COM_MAP()
  32. //DECLARE_NOT_AGGREGATABLE(CPropShellExt)
  33. DECLARE_REGISTRY_RESOURCEID(IDR_PROP_SHELL_EXT)
  34. public:
  35. // IShellExtInit Methods
  36. STDMETHOD(Initialize)(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID );
  37. //IShellPropSheetExt methods
  38. STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
  39. STDMETHODIMP ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam);
  40. //ICopyHook methods
  41. STDMETHODIMP_(UINT) CopyCallback(
  42. HWND hwnd,
  43. UINT wFunc,
  44. UINT wFlags,
  45. LPCTSTR pszSrcFile,
  46. DWORD dwSrcAttribs,
  47. LPCTSTR pszDestFile,
  48. DWORD dwDestAttribs
  49. );
  50. // const CComAuthInfo * GetAuthentication() const
  51. // {
  52. // return &m_auth;
  53. // }
  54. LPCTSTR GetPath()
  55. {
  56. return m_szFileName;
  57. }
  58. private:
  59. TCHAR m_szFileName[MAX_PATH];
  60. // CComAuthInfo m_auth;
  61. CW3PropPage m_psW3ShellExtProp;
  62. };
  63. #endif // !defined(_PROPSHELLEXT_H)