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.

67 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: extract.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // ExtractIcon.h : Declaration of the CExtractIcon
  11. #ifndef __EXTRACTICON_H_
  12. #define __EXTRACTICON_H_
  13. #include "mmcshext.h" // main symbols
  14. #include "picon.h"
  15. #ifdef ASSERT
  16. #undef ASSERT
  17. #endif
  18. #define ASSERT(e) // get rid of the assert symbol.
  19. #include "cstr.h"
  20. extern CLSID CLSID_ExtractIcon;
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CExtractIcon
  23. class ATL_NO_VTABLE CExtractIcon :
  24. public CComObjectRootEx<CComSingleThreadModel>,
  25. public CComCoClass<CExtractIcon, &CLSID_ExtractIcon>,
  26. public IExtractIcon,
  27. public IPersistFile
  28. {
  29. public:
  30. CExtractIcon()
  31. {
  32. }
  33. // IExtractIcon
  34. STDMETHOD(Extract) (LPCTSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
  35. STDMETHOD(GetIconLocation) (UINT uFlags, LPTSTR szIconFile, UINT cchMax, LPINT piIndex, UINT *pwFlags);
  36. // IPersistFile
  37. STDMETHOD(GetClassID) (CLSID *pClassID) {return E_NOTIMPL;}
  38. STDMETHOD(IsDirty) (void) {return E_NOTIMPL;}
  39. STDMETHOD(Load) (LPCOLESTR pszFileName, DWORD dwMode);
  40. STDMETHOD(Save) (LPCOLESTR pszFileName, BOOL fRemember) {return E_NOTIMPL;}
  41. STDMETHOD(SaveCompleted) (LPCOLESTR pszFileName) {return E_NOTIMPL;}
  42. STDMETHOD(GetCurFile) (LPOLESTR *ppszFileName) {return E_NOTIMPL;}
  43. DECLARE_REGISTRY_RESOURCEID(IDR_EXTRACTICON)
  44. DECLARE_PROTECT_FINAL_CONSTRUCT()
  45. BEGIN_COM_MAP(CExtractIcon)
  46. COM_INTERFACE_ENTRY_IID(IID_IExtractIcon, IExtractIcon)
  47. COM_INTERFACE_ENTRY(IPersistFile)
  48. END_COM_MAP()
  49. private:
  50. CStr m_strIconFile;
  51. };
  52. #endif //__EXTRACTICON_H_