
/*----------------------------------*/
/*                                  */
/*----------------------------------*/
typedef struct exe_hdr    EXE_HDR,    *PEXE_HDR;
typedef struct e32_exe    E32_EXE,    *PE32_EXE;
typedef struct o32_obj    O32_OBJ,    *PO32_OBJ;
typedef struct r32_rlc    R32_RLC,    *PR32_RLC;
typedef struct o32_map    O32_MAP,    *PO32_MAP;
typedef struct LX_Iter    LX_ITER,    *PLX_ITER;
typedef struct b32_bundle B32_BUNDLE, *PB32_BUNDLE;
typedef struct e32_entry  E32_ENTRY,  *PB32_ENTRY;

/*----------------------------------*/
/*                                  */
/*----------------------------------*/
typedef struct _OBJINFO *POBJINFO;

typedef struct _OBJINFO
{

  POBJINFO      pObjNext;
  ULONG         ObjNum;
  ULONG         ObjLength;
  ULONG         ObjFlags;
  ULONG         ObjVirtAddr;
  ULONG         FileOffset;

} OBJINFO;


/*----------------------------------*/
/*                                  */
/*----------------------------------*/
typedef struct _OBJPGINFO
{
  ULONG         PGFilePos;
  ULONG         PGVirtAddr;

} OBJPGINFO, *POBJPGINFO;

/*----------------------------------*/
/*                                  */
/*----------------------------------*/
typedef struct _MODINFO *PMODINFO;

typedef struct _MODINFO
{

  PMODINFO      pModNext;
  PSZ           pModName;
  FILE          *hModFile;

  ULONG         LXHdrPos;

  ULONG         ModBaseAddr;
  ULONG         ModCurAddr;
  POBJINFO      pObjInfo;

  PE32_EXE      pLXHData;

  POBJPGINFO    pObjPGInfo;

} MODINFO;

/*----------------------------------*/
/*                                  */
/*----------------------------------*/
typedef struct _FIXINFO
{
  PMODINFO      pMI;

  PR32_RLC      pRLC;
  PBYTE         pFixNext;

  ULONG         SrcPGAddr;
  ULONG         SrcPGPos;

  ULONG         FixCount;
  PUSHORT       pSrcFixOff;

  ULONG         FixLen;
  union
  {
    UCHAR       Byte[6];
    USHORT      Word[3];
    ULONG       Long;
  } FixText;

} FIXINFO, *PFIXINFO;

/*----------------------------------*/
/*                                  */
/*----------------------------------*/

typedef struct _ERRINFO
{
  PBYTE         Text;
  ULONG         RetCode;

} ERRINFO;
