Class InformationBlock


  • public class InformationBlock
    extends java.lang.Object

    A class to respresent the Information Block defined in the Windows new-style executable.

    ...as defined in WINNT.H

     typedef struct _IMAGE_OS2_HEADER {      // OS/2 .EXE header
         WORD   ne_magic;                    // Magic number
         CHAR   ne_ver;                      // Version number
         CHAR   ne_rev;                      // Revision number
         WORD   ne_enttab;                   // Offset of Entry Table
         WORD   ne_cbenttab;                 // Number of bytes in Entry Table
         LONG   ne_crc;                      // Checksum of whole file
         WORD   ne_flags;                    // Flag word
         WORD   ne_autodata;                 // Automatic data segment number
         WORD   ne_heap;                     // Initial heap allocation
         WORD   ne_stack;                    // Initial stack allocation
         LONG   ne_csip;                     // Initial CS:IP setting
         LONG   ne_sssp;                     // Initial SS:SP setting
         WORD   ne_cseg;                     // Count of file segments
         WORD   ne_cmod;                     // Entries in Module Reference Table
         WORD   ne_cbnrestab;                // Size of non-resident name table
         WORD   ne_segtab;                   // Offset of Segment Table
         WORD   ne_rsrctab;                  // Offset of Resource Table
         WORD   ne_restab;                   // Offset of resident name table
         WORD   ne_modtab;                   // Offset of Module Reference Table
         WORD   ne_imptab;                   // Offset of Imported Names Table
         LONG   ne_nrestab;                  // Offset of Non-resident Names Table
         WORD   ne_cmovent;                  // Count of movable entries
         WORD   ne_align;                    // Segment alignment shift count
         WORD   ne_cres;                     // Count of resource segments
         BYTE   ne_exetyp;                   // Target Operating system
         BYTE   ne_flagsothers;              // Other .EXE flags
         WORD   ne_pretthunks;               // offset to return thunks
         WORD   ne_psegrefbytes;             // offset to segment ref. bytes
         WORD   ne_swaparea;                 // Minimum code swap area size
         WORD   ne_expver;                   // Expected Windows version number
     } IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
     
    • Field Detail

      • FLAGS_PROG_NO_AUTO_DATA

        public static final byte FLAGS_PROG_NO_AUTO_DATA
        Program flags: no auto data segments
        See Also:
        Constant Field Values
      • FLAGS_PROG_SINGLE_DATA

        public static final byte FLAGS_PROG_SINGLE_DATA
        Program flags: single data segment
        See Also:
        Constant Field Values
      • FLAGS_PROG_MULTIPLE_DATA

        public static final byte FLAGS_PROG_MULTIPLE_DATA
        Program flags: multiple data segments
        See Also:
        Constant Field Values
      • FLAGS_PROG_GLOBAL_INIT

        public static final byte FLAGS_PROG_GLOBAL_INIT
        See Also:
        Constant Field Values
      • FLAGS_PROG_PROTECTED_MODE

        public static final byte FLAGS_PROG_PROTECTED_MODE
        See Also:
        Constant Field Values
      • FLAGS_APP_FULL_SCREEN

        public static final byte FLAGS_APP_FULL_SCREEN
        Is application full screen?
        See Also:
        Constant Field Values
      • FLAGS_APP_WIN_PM_COMPATIBLE

        public static final byte FLAGS_APP_WIN_PM_COMPATIBLE
        Is application compatible with Windows Program Manager?
        See Also:
        Constant Field Values
      • FLAGS_APP_WINDOWS_PM

        public static final byte FLAGS_APP_WINDOWS_PM
        Does application use Windows Program Manager?
        See Also:
        Constant Field Values
      • FLAGS_APP_OS2

        public static final byte FLAGS_APP_OS2
        Is application designed for OS/2?
        See Also:
        Constant Field Values
      • FLAGS_APP_NONCONFORMING_PROG

        public static final byte FLAGS_APP_NONCONFORMING_PROG
        See Also:
        Constant Field Values
      • FLAGS_APP_LIBRARY_MODULE

        public static final byte FLAGS_APP_LIBRARY_MODULE
        See Also:
        Constant Field Values
      • EXETYPE_UNKNOWN

        public static final byte EXETYPE_UNKNOWN
        Unknown executable type
        See Also:
        Constant Field Values
      • EXETYPE_WINDOWS

        public static final byte EXETYPE_WINDOWS
        Windows executable
        See Also:
        Constant Field Values
      • EXETYPE_EUROPEAN_DOS_4

        public static final byte EXETYPE_EUROPEAN_DOS_4
        European DOS 4.x executable
        See Also:
        Constant Field Values
      • EXETYPE_RESERVED4

        public static final byte EXETYPE_RESERVED4
        Reserved executable Type
        See Also:
        Constant Field Values
      • EXETYPE_WINDOWS_386

        public static final byte EXETYPE_WINDOWS_386
        Windows 386 executable
        See Also:
        Constant Field Values
      • EXETYPE_BOSS

        public static final byte EXETYPE_BOSS
        Borland Operating System Services executable
        See Also:
        Constant Field Values
      • EXETYPE_PHARLAP_286_OS2

        public static final byte EXETYPE_PHARLAP_286_OS2
        Pharlap 286 OS/2 executable
        See Also:
        Constant Field Values
      • EXETYPE_PHARLAP_286_WIN

        public static final byte EXETYPE_PHARLAP_286_WIN
        Pharlap 386 Windows executable
        See Also:
        Constant Field Values
      • OTHER_FLAGS_SUPPORTS_LONG_NAMES

        public static final byte OTHER_FLAGS_SUPPORTS_LONG_NAMES
        Supports long names
        See Also:
        Constant Field Values
      • OTHER_FLAGS_PROTECTED_MODE

        public static final byte OTHER_FLAGS_PROTECTED_MODE
        Protected mode
        See Also:
        Constant Field Values
      • OTHER_FLAGS_PROPORTIONAL_FONT

        public static final byte OTHER_FLAGS_PROPORTIONAL_FONT
        Proportional font
        See Also:
        Constant Field Values
      • OTHER_FLAGS_GANGLOAD_AREA

        public static final byte OTHER_FLAGS_GANGLOAD_AREA
        Gangload area
        See Also:
        Constant Field Values
    • Method Detail

      • getMagicNumber

        public short getMagicNumber()
        Returns the magic number.
        Returns:
        the magic number
      • getVersion

        public short getVersion()
        Returns the version number.
        Returns:
        the version number
      • getRevision

        public short getRevision()
        Returns the revision number.
        Returns:
        the revision number
      • getChecksum

        public int getChecksum()
        Returns the checksum.
        Returns:
        the checksum
      • getInitialHeapSize

        public short getInitialHeapSize()
        Returns the initial heap size.
        Returns:
        the initial heap size
      • getInitialStackSize

        public short getInitialStackSize()
        Returns the initial stack size.
        Returns:
        the initial stack size
      • getTargetOpSys

        public byte getTargetOpSys()
        Returns the target operating system.
        Returns:
        the target operating system
      • getMinCodeSwapSize

        public short getMinCodeSwapSize()
        Returns the minimum code swap size.
        Returns:
        the minimum code swap size
      • getExpectedWindowsVersion

        public short getExpectedWindowsVersion()
        Returns the expected windows version.
        Returns:
        the expected windows version
      • getAutomaticDataSegment

        public short getAutomaticDataSegment()
        Returns the automatic data segment.
        Returns:
        the automatic data segment
      • getOtherFlags

        public byte getOtherFlags()
        Returns the other flags.
        Returns:
        the other flags
      • getOtherFlagsAsString

        public java.lang.String getOtherFlagsAsString()
        Returns a string representation of the other flags.
        Returns:
        a string representation of the other flags
      • getProgramFlags

        public byte getProgramFlags()
        Returns the program flags.
        Returns:
        the program flags
      • getApplicationFlags

        public byte getApplicationFlags()
        Returns the application flags.
        Returns:
        the application flags
      • getEntryPointSegment

        public short getEntryPointSegment()
        Returns the segment portion of the entry point.
        Returns:
        the segment portion of the entry point
      • getEntryPointOffset

        public short getEntryPointOffset()
        Returns the offset portion of the entry point.
        Returns:
        the offset portion of the entry point
      • getStackPointerSegment

        public short getStackPointerSegment()
        Returns the segment portion of the stack pointer.
        Returns:
        the segment portion of the stack pointer
      • getStackPointerOffset

        public short getStackPointerOffset()
        Returns the offset portion of the stack pointer.
        Returns:
        the offset portion of the stack pointer
      • getTargetOpSysAsString

        public java.lang.String getTargetOpSysAsString()
        Returns a string represention of the target operating system.
        Returns:
        a string represention of the target operating system
      • getApplicationFlagsAsString

        public java.lang.String getApplicationFlagsAsString()
        Returns a string represention of the application flags.
        Returns:
        a string represention of the application flags
      • getProgramFlagsAsString

        public java.lang.String getProgramFlagsAsString()
        Returns a string represention of the program flags.
        Returns:
        a string represention of the program flags