From e37b1160298903c450f461a08391687daea5d7e8 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 1 Mar 2018 16:58:22 +0000 Subject: [PATCH] Corrected USERBLK. --- libexeinfo/GEM/Enums.cs | 2 +- libexeinfo/GEM/Resources.cs | 8 ++++---- libexeinfo/GEM/Structs.cs | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libexeinfo/GEM/Enums.cs b/libexeinfo/GEM/Enums.cs index ea6eab2..4c2fb92 100644 --- a/libexeinfo/GEM/Enums.cs +++ b/libexeinfo/GEM/Enums.cs @@ -190,7 +190,7 @@ namespace libexeinfo /// G_IMAGE = 23, /// - /// A programmed defined object. Its is a pointer to a + /// A programmed defined object. Its is a pointer to a /// structure. /// G_USERDEF = 24, diff --git a/libexeinfo/GEM/Resources.cs b/libexeinfo/GEM/Resources.cs index 9957c7f..ecb4067 100644 --- a/libexeinfo/GEM/Resources.cs +++ b/libexeinfo/GEM/Resources.cs @@ -154,11 +154,11 @@ namespace libexeinfo if(node.data <= 0 || node.data >= resourceStream.Length) break; resourceStream.Position = node.data; - buffer = new byte[Marshal.SizeOf(typeof(UserBlock))]; + buffer = new byte[Marshal.SizeOf(typeof(ApplicationBlock))]; resourceStream.Read(buffer, 0, buffer.Length); - node.UserBlock = bigEndian - ? BigEndianMarshal.ByteArrayToStructureBigEndian(buffer) - : BigEndianMarshal.ByteArrayToStructureLittleEndian(buffer); + node.ApplicationBlock = bigEndian + ? BigEndianMarshal.ByteArrayToStructureBigEndian(buffer) + : BigEndianMarshal.ByteArrayToStructureLittleEndian(buffer); break; case ObjectTypes.G_ICON: if(node.data <= 0 || node.data >= resourceStream.Length) break; diff --git a/libexeinfo/GEM/Structs.cs b/libexeinfo/GEM/Structs.cs index 0ddc71e..fd26215 100644 --- a/libexeinfo/GEM/Structs.cs +++ b/libexeinfo/GEM/Structs.cs @@ -204,7 +204,7 @@ namespace libexeinfo public TextBlock TedInfo; public ObjectTypes type; - public UserBlock UserBlock; + public ApplicationBlock ApplicationBlock; public short width; public short x; public short y; @@ -431,20 +431,20 @@ namespace libexeinfo } /// - /// The USERBLK structure is used to locate and call an application-defined routine that will draw and/or change an - /// object. The object type G_UERDEF points with its pointer to an USERBLK structure. + /// The APPLBLK structure is used to locate and call an application-defined routine that will draw and/or change an + /// object. The object type G_USERDEF points with its pointer to an USERBLK structure. /// [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct UserBlock + public struct ApplicationBlock { /// /// A pointer to the routine for drawing and/or changing the object /// - public int ub_code; + public int ab_code; /// - /// A long value (optionally provided by the application) passed as a parameter when calling the routine + /// A pointer to a /// - public int ub_parm; + public int ab_parm; } /// @@ -502,12 +502,12 @@ namespace libexeinfo /// public short pb_hc; /// - /// A long value, identical to , that is passed to the application when it is time for + /// A long value, identical to , that is passed to the application when it is time for /// the application to draw or change the object. Low word. /// public short pb_parm_low; /// - /// A long value, identical to , that is passed to the application when it is time for + /// A long value, identical to , that is passed to the application when it is time for /// the application to draw or change the object. High word. /// public short pb_parm_high;