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.

109 lines
2.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: xicon.hxx
  7. //
  8. // Contents: Declaration of CSharesEI & CSharesEIA, implementations
  9. // of IExtractIcon
  10. //
  11. // History: 14-Dec-95 BruceFo Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #ifndef __XICON_HXX__
  15. #define __XICON_HXX__
  16. //////////////////////////////////////////////////////////////////////////////
  17. class CSharesEI : public IExtractIcon
  18. {
  19. public:
  20. CSharesEI(IN BYTE bFlags, IN DWORD type) : m_ulRefs(0), m_bFlags(bFlags), m_dwType(type) { AddRef(); }
  21. ~CSharesEI() {}
  22. //
  23. // IUnknown methods
  24. //
  25. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
  26. STDMETHOD_(ULONG,AddRef)();
  27. STDMETHOD_(ULONG,Release)();
  28. //
  29. // IExtractIcon methods
  30. //
  31. STDMETHOD(GetIconLocation)(
  32. UINT uFlags,
  33. LPWSTR szIconFile,
  34. UINT cchMax,
  35. int* piIndex,
  36. UINT* pwFlags
  37. );
  38. STDMETHOD(Extract)(
  39. LPCWSTR pszFile,
  40. UINT nIconIndex,
  41. HICON* phiconLarge,
  42. HICON* phiconSmall,
  43. UINT nIconSize
  44. );
  45. private:
  46. ULONG m_ulRefs;
  47. BYTE m_bFlags;
  48. DWORD m_dwType;
  49. };
  50. #ifdef UNICODE
  51. class CSharesEIA : public IExtractIconA
  52. {
  53. public:
  54. CSharesEIA(IN BYTE bFlags, IN DWORD type) : m_ulRefs(0), m_bFlags(bFlags), m_dwType(type) { AddRef(); }
  55. ~CSharesEIA() {}
  56. //
  57. // IUnknown methods
  58. //
  59. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
  60. STDMETHOD_(ULONG,AddRef)();
  61. STDMETHOD_(ULONG,Release)();
  62. //
  63. // IExtractIconA methods
  64. //
  65. STDMETHOD(GetIconLocation)(
  66. UINT uFlags,
  67. LPSTR szIconFile,
  68. UINT cchMax,
  69. int* piIndex,
  70. UINT* pwFlags
  71. );
  72. STDMETHOD(Extract)(
  73. LPCSTR pszFile,
  74. UINT nIconIndex,
  75. HICON* phiconLarge,
  76. HICON* phiconSmall,
  77. UINT nIconSize
  78. );
  79. private:
  80. ULONG m_ulRefs;
  81. BYTE m_bFlags;
  82. DWORD m_dwType;
  83. };
  84. #endif // UNICODE
  85. #endif // __XICON_HXX__