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.

82 lines
2.7 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: ImgRes32.H
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. // Declaration of ILocRes32Image.
  9. // This interface allows to convert the localizable items of a resource
  10. // into a res32 image, and viceversa.
  11. //
  12. //-----------------------------------------------------------------------------
  13. #ifndef IMGRES32_H
  14. #define IMGRES32_H
  15. struct Res32FontInfo
  16. {
  17. WORD wLength; //Structure length
  18. WORD wPointSize;
  19. WORD wWeight;
  20. WORD wStyle;
  21. CPascalString pasName;
  22. };
  23. class CLocItemPtrArray;
  24. class CFile;
  25. extern const IID IID_ILocRes32Image;
  26. DECLARE_INTERFACE_(ILocRes32Image, IUnknown)
  27. {
  28. //
  29. // IUnknown standard interface.
  30. //
  31. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR*ppvObj) PURE;
  32. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  33. STDMETHOD_(ULONG, Release)(THIS) PURE;
  34. //
  35. // Standard Debugging interface.
  36. //
  37. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD PURE;
  38. //Builds a Res32 file image of a resource from the resource's CLocItem objects
  39. //Inputs:
  40. // - A pointer to a CLocItemPtrArray object containing the CLocItem objects of
  41. // a resource (like a dialog or a menu).
  42. // - An array index to the root item of the resource.
  43. // - An array index to the selected item of the resource.
  44. // - The resource's language id.
  45. // - A pointer to an existing empty CFile.
  46. // - A pointer to a Res32FontInfo structure
  47. // - A pointer to a reporter object where all error messages are sent.
  48. //Outputs:
  49. // - The CFile object has the res32 image of the resource.
  50. // - The CLocItemPtrArray object has its items ordered by physical
  51. // location in the res32 image.
  52. //Return:
  53. // TRUE if the image was created successfully. FALSE, otherwise.
  54. STDMETHOD_(BOOL, MakeRes32Image)(THIS_ CLocItemPtrArray *, int, int,
  55. LangId, CFile *, Res32FontInfo*, CLocItemHandler *) PURE;
  56. //Breaks the Res32 image of a resource into the corresponding CLocItem objects.
  57. //Inputs:
  58. // - A pointer to a CFile object containing the res32 image of a resource.
  59. // - The resource's language id.
  60. // - A pointer to a CLocItemPtrArray containing the CLocItem objects of the
  61. // resource. The items are expected to be ordered by position in the res32 image.
  62. // - A pointer to a reporter object where all error messages are sent.
  63. //Outputs:
  64. // - The items in the CLocItemPtrArray object are updated with the new data from
  65. // the res32 image.
  66. //Return:
  67. // TRUE if the imaged could be parsed and if the items could be updated successfully.
  68. // FALSE, otherwise.
  69. STDMETHOD_(BOOL, CrackRes32Image)(THIS_ CFile *, LangId, CLocItemPtrArray *, CLocItemHandler *) PURE;
  70. };
  71. #endif // IMGRES32_H