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.

141 lines
3.1 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: impresob.h
  4. //
  5. // Declare the implementation of the ICreateResObj interface
  6. //
  7. // Copyright (c) 1995 - 1997, Microsoft Corporation. All rights reserved.
  8. //
  9. //-----------------------------------------------------------------------------
  10. #ifndef IMPRESOB_H
  11. #define IMPRESOB_H
  12. class CLocImpResObj : public ICreateResObj2, public CLObject
  13. {
  14. public:
  15. CLocImpResObj();
  16. ~CLocImpResObj();
  17. //
  18. // Standard IUnknown methods
  19. //
  20. STDMETHOD_(ULONG, AddRef)();
  21. STDMETHOD_(ULONG, Release)();
  22. STDMETHOD(QueryInterface)(REFIID iid, LPVOID* ppvObj);
  23. //
  24. // Standard Debugging interfaces
  25. //
  26. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD;
  27. //
  28. // ICreateResObj interfaces
  29. //
  30. STDMETHOD_(CResObj *, CreateResObj)(THIS_ C32File * p32file,
  31. CLocItem * pLocItem, DWORD dwSize, void * pvHeader);
  32. STDMETHOD_(void, OnCreateWin32File)(THIS_ C32File*);
  33. STDMETHOD_(void, OnDestroyWin32File)(THIS_ C32File*);
  34. STDMETHOD_(BOOL, OnBeginEnumerate)(THIS_ C32File*);
  35. STDMETHOD_(BOOL, OnEndEnumerate)(THIS_ C32File*, BOOL bOK);
  36. STDMETHOD_(BOOL, OnBeginGenerate)(THIS_ C32File*);
  37. STDMETHOD_(BOOL, OnEndGenerate)(THIS_ C32File*, BOOL bOK);
  38. //
  39. // CLObject implementation
  40. //
  41. #ifdef _DEBUG
  42. void AssertValid(void) const;
  43. void Dump(CDumpContext &) const;
  44. #endif
  45. private:
  46. //
  47. // Implementation for IUnknown and ILocParser.
  48. ULONG m_ulRefCount;
  49. // Embedded class for ILocBinary interface
  50. class CLocImpBinary : public ILocBinary, public CLObject
  51. {
  52. friend CLocImpResObj;
  53. public:
  54. CLocImpBinary();
  55. ~CLocImpBinary();
  56. //
  57. // Standard IUnknown methods
  58. //
  59. STDMETHOD_(ULONG, AddRef)();
  60. STDMETHOD_(ULONG, Release)();
  61. STDMETHOD(QueryInterface)(REFIID iid, LPVOID* ppvObj);
  62. //
  63. // Standard Debugging interface.
  64. //
  65. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD;
  66. //
  67. // ILocBinary interface
  68. //
  69. STDMETHOD_(BOOL, CreateBinaryObject)(THIS_ BinaryId, CLocBinary *REFERENCE);
  70. //
  71. // CLObject implementation
  72. //
  73. #ifdef _DEBUG
  74. void AssertValid(void) const;
  75. void Dump(CDumpContext &) const;
  76. #endif
  77. private:
  78. CLocImpResObj *m_pParent;
  79. } m_IBinary;
  80. // Embedded class for ILocParser
  81. class CLocImpParser : public ILocParser, public CLObject
  82. {
  83. friend CLocImpResObj;
  84. public:
  85. CLocImpParser();
  86. ~CLocImpParser();
  87. //
  88. // Standard IUnknown methods
  89. //
  90. STDMETHOD_(ULONG, AddRef)();
  91. STDMETHOD_(ULONG, Release)();
  92. STDMETHOD(QueryInterface)(REFIID iid, LPVOID* ppvObj);
  93. //
  94. // Standard Debugging interfaces
  95. //
  96. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD;
  97. //
  98. // ILocParser interfaces
  99. //
  100. STDMETHOD(Init)(IUnknown *);
  101. STDMETHOD(CreateFileInstance)(THIS_ ILocFile *REFERENCE, FileType);
  102. STDMETHOD_(void, GetParserInfo)(THIS_ ParserInfo REFERENCE)
  103. CONST_METHOD;
  104. STDMETHOD_(void, GetFileDescriptions)(THIS_ CEnumCallback &) CONST_METHOD;
  105. //
  106. // CLObject implementation
  107. //
  108. #ifdef _DEBUG
  109. void AssertValid(void) const;
  110. void Dump(CDumpContext &) const;
  111. #endif
  112. private:
  113. CLocImpResObj *m_pParent;
  114. } m_IParser;
  115. };
  116. #endif //IMPRESOB_H