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.

62 lines
1.6 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: Sampres.H
  4. //
  5. // Declaration of classes for the CRecObj derived class
  6. //
  7. // Copyright (c) 1995 - 1997, Microsoft Corporation. All rights reserved.
  8. //
  9. //-----------------------------------------------------------------------------
  10. #ifndef __SAMPRES_H
  11. #define __SAMPRES_H
  12. //
  13. // CSampleResObj wraps a SDM DLTHEADER structure
  14. //
  15. class CSampleResObj : public CResObj
  16. {
  17. public:
  18. CSampleResObj(CLocItem *pLocItem, DWORD dwSize, void *pvHeader);
  19. virtual ~CSampleResObj();
  20. //
  21. //CResObj overrides
  22. //
  23. virtual BOOL Read(C32File *p32File);
  24. virtual BOOL Write(C32File *p32File);
  25. virtual BOOL CanReadWrite();
  26. virtual BOOL ReadWrite(C32File* pSrcFile, C32File* pTgtFile);
  27. virtual BOOL ReadRes32(C32File *p32File);
  28. virtual BOOL WriteRes32(C32File *p32File);
  29. virtual BOOL ReadRgLocItem(CLocItemPtrArray * pRgLocItem, int nSelItem);
  30. virtual BOOL WriteRgLocItem(CLocItemPtrArray * pRgLocItem, CReporter*);
  31. virtual const void* GetBufferPointer(void);
  32. virtual DWORD GetBufferSize(void);
  33. virtual void SetBufferSize(DWORD dwSize);
  34. virtual void MakeRes32Header(LangId nLangId);
  35. virtual CLocItem* GetLocItem();
  36. virtual BOOL IsKeepLocItems();
  37. virtual void SetKeepLocItems(BOOL fKeep);
  38. virtual BOOL GetMnemonics(CMnemonicsMap & mapMnemonics,
  39. CReporter* pReporter);
  40. virtual void AssertValid(void) const;
  41. protected:
  42. DWORD m_dwSize;
  43. void *m_pvHeader;
  44. CLocItem * m_pLocItem;
  45. BOOL m_fKeepLocItems;
  46. static void SetParent(CLocItem* pLocItem, C32File* pFile);
  47. BOOL ReadWriteHelper(C32File* pSrcFile, C32File* pTgtFile,
  48. BOOL fGenerate);
  49. private:
  50. };
  51. #endif //__SAMPRES_H