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.

81 lines
2.4 KiB

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