mirror of
https://github.com/claunia/libexeinfo.git
synced 2025-12-16 19:14:24 +00:00
Corrected USERBLK.
This commit is contained in:
@@ -190,7 +190,7 @@ namespace libexeinfo
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
G_IMAGE = 23,
|
G_IMAGE = 23,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A programmed defined object. Its <see cref="ObjectNode.ob_spec" /> is a pointer to a <see cref="UserBlock" />
|
/// A programmed defined object. Its <see cref="ObjectNode.ob_spec" /> is a pointer to a <see cref="ApplicationBlock" />
|
||||||
/// structure.
|
/// structure.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
G_USERDEF = 24,
|
G_USERDEF = 24,
|
||||||
|
|||||||
@@ -154,11 +154,11 @@ namespace libexeinfo
|
|||||||
if(node.data <= 0 || node.data >= resourceStream.Length) break;
|
if(node.data <= 0 || node.data >= resourceStream.Length) break;
|
||||||
|
|
||||||
resourceStream.Position = node.data;
|
resourceStream.Position = node.data;
|
||||||
buffer = new byte[Marshal.SizeOf(typeof(UserBlock))];
|
buffer = new byte[Marshal.SizeOf(typeof(ApplicationBlock))];
|
||||||
resourceStream.Read(buffer, 0, buffer.Length);
|
resourceStream.Read(buffer, 0, buffer.Length);
|
||||||
node.UserBlock = bigEndian
|
node.ApplicationBlock = bigEndian
|
||||||
? BigEndianMarshal.ByteArrayToStructureBigEndian<UserBlock>(buffer)
|
? BigEndianMarshal.ByteArrayToStructureBigEndian<ApplicationBlock>(buffer)
|
||||||
: BigEndianMarshal.ByteArrayToStructureLittleEndian<UserBlock>(buffer);
|
: BigEndianMarshal.ByteArrayToStructureLittleEndian<ApplicationBlock>(buffer);
|
||||||
break;
|
break;
|
||||||
case ObjectTypes.G_ICON:
|
case ObjectTypes.G_ICON:
|
||||||
if(node.data <= 0 || node.data >= resourceStream.Length) break;
|
if(node.data <= 0 || node.data >= resourceStream.Length) break;
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ namespace libexeinfo
|
|||||||
|
|
||||||
public TextBlock TedInfo;
|
public TextBlock TedInfo;
|
||||||
public ObjectTypes type;
|
public ObjectTypes type;
|
||||||
public UserBlock UserBlock;
|
public ApplicationBlock ApplicationBlock;
|
||||||
public short width;
|
public short width;
|
||||||
public short x;
|
public short x;
|
||||||
public short y;
|
public short y;
|
||||||
@@ -431,20 +431,20 @@ namespace libexeinfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The USERBLK structure is used to locate and call an application-defined routine that will draw and/or change an
|
/// 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_UERDEF points with its <see cref="ObjectNode.ob_spec" /> pointer to an USERBLK structure.
|
/// object. The object type G_USERDEF points with its <see cref="ObjectNode.ob_spec" /> pointer to an USERBLK structure.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
public struct UserBlock
|
public struct ApplicationBlock
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A pointer to the routine for drawing and/or changing the object
|
/// A pointer to the routine for drawing and/or changing the object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ub_code;
|
public int ab_code;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A long value (optionally provided by the application) passed as a parameter when calling the routine
|
/// A pointer to a <see cref="ParameterBlock"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ub_parm;
|
public int ab_parm;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -502,12 +502,12 @@ namespace libexeinfo
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public short pb_hc;
|
public short pb_hc;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A long value, identical to <see cref="UserBlock.ub_parm" />, that is passed to the application when it is time for
|
/// A long value, identical to <see cref="ApplicationBlock.ab_parm" />, that is passed to the application when it is time for
|
||||||
/// the application to draw or change the object. Low word.
|
/// the application to draw or change the object. Low word.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public short pb_parm_low;
|
public short pb_parm_low;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A long value, identical to <see cref="UserBlock.ub_parm" />, that is passed to the application when it is time for
|
/// A long value, identical to <see cref="ApplicationBlock.ab_parm" />, that is passed to the application when it is time for
|
||||||
/// the application to draw or change the object. High word.
|
/// the application to draw or change the object. High word.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public short pb_parm_high;
|
public short pb_parm_high;
|
||||||
|
|||||||
Reference in New Issue
Block a user