Leaked source code of windows server 2003
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.

75 lines
2.3 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: winres.h
  3. *
  4. * structures for accessing font resources within 16 bit fon dlls
  5. *
  6. * Created: 08-May-1991 13:12:57
  7. * Author: Bodin Dresevic [BodinD]
  8. *
  9. * Copyright (c) 1990-1999 Microsoft Corporation
  10. *
  11. \**************************************************************************/
  12. //
  13. // The main structure for manipulating the resource data. One of these
  14. // is created when access is required to a resource, and it is destroyed
  15. // when the resource is no longer required.
  16. typedef struct // wrd
  17. {
  18. PVOID pvView; // view of the mapped *.fon file
  19. ULONG cjView; // size of the view
  20. // stuff referring to general resources
  21. PTRDIFF dpNewExe; // Base address of new header in file
  22. ULONG ulShift; // Shift factor for resource info
  23. PTRDIFF dpResTab; // Offset in file of resource table (first RSRC_TYPEINFO struct)
  24. ULONG cjResTab; // Bytes in file to store for above
  25. // stuff referring to font resources specifically
  26. ULONG cFntRes; // # of font resources in a file
  27. PTRDIFF dpFntTab; // File location of first RSRC_NAMEINFO corresponding to an *.fnt resource
  28. PTRDIFF dpFdirRes; // File location of first RSRC_NAMEINFO corresponding to an FONTDIR resource
  29. } WINRESDATA, *PWINRESDATA;
  30. // Bit fields for use with status above.
  31. #define WRD_NOTHING 0x0000 // Unitialised state
  32. #define WRD_FOPEN 0x0001 // File is open
  33. #define WRD_RESDATOK 0x0002 // Resource data available ???
  34. // The structure passed to, and filled in by, vGetFontRes(). Contains
  35. // information about a specific resource type & name.
  36. typedef struct _RES_ELEM // re
  37. {
  38. PVOID pvResData; // Address of data
  39. PTRDIFF dpResData; // offset of the data above, not used for fon32
  40. ULONG cjResData; // Resource size
  41. PBYTE pjFaceName; // Face name from the font directory
  42. } RES_ELEM, *PRES_ELEM;
  43. // Function Prototypes
  44. BOOL bInitWinResData
  45. (
  46. PVOID pvView,
  47. ULONG cjView,
  48. PWINRESDATA pwrd
  49. );
  50. BOOL bGetFntResource
  51. (
  52. PWINRESDATA pwrd,
  53. ULONG iRes,
  54. PRES_ELEM pre
  55. );