externaltypes.pp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2008 by Giulio Bernardi
  4. Types and constants used by external resource reader and writer
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$IFNDEF FPC_DOTTEDUNITS}
  12. unit externaltypes;
  13. {$ENDIF FPC_DOTTEDUNITS}
  14. {$MODE OBJFPC} {$H+}
  15. interface
  16. type
  17. TExternalResMagic = array[1..6] of AnsiChar;
  18. type
  19. TExtHeader = packed record
  20. magic : TExternalResMagic; //'FPCRES'
  21. version : byte; //EXT_CURRENT_VERSION
  22. endianess : byte; //EXT_ENDIAN_BIG or EXT_ENDIAN_LITTLE
  23. count : longword; //resource count
  24. nodesize : longword; //size of header (up to string table, excluded)
  25. hdrsize : longword; //size of header (up to string table, included)
  26. reserved1 : longword;
  27. reserved2 : longword;
  28. reserved3 : longword;
  29. end;
  30. TResInfoNode = packed record
  31. nameid : longword; //name offset / integer ID / languageID
  32. ncount : longword; //named sub-entries count
  33. idcountsize : longword; //id sub-entries count / resource size
  34. subptr : longword; //first sub-entry offset
  35. end;
  36. const
  37. EXTERNAL_RESMAGIC : TExternalResMagic = 'FPCRES';
  38. EXT_CURRENT_VERSION = 1;
  39. EXT_ENDIAN_BIG = 1;
  40. EXT_ENDIAN_LITTLE = 2;
  41. implementation
  42. end.