Ignore:
Timestamp:
Aug 18, 1999, 7:18:01 PM (26 years ago)
Author:
sandervl
Message:

PE loader changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/winimage.h

    r544 r550  
    1 /* $Id: winimage.h,v 1.5 1999-08-18 12:24:53 sandervl Exp $ */
     1/* $Id: winimage.h,v 1.6 1999-08-18 17:16:05 sandervl Exp $ */
    22
    33/*
     
    2727#endif
    2828
     29#ifndef CCHMAXPATH
     30#define CCHMAXPATH 260
     31#endif
    2932
    3033//SvL: Amount of memory the peldr dll reserves for win32 exes without fixups
     
    125128        char *getFullPath()           { return fullpath; };
    126129
     130        char *getModuleName()         { return szModule; };
     131
    127132        HRSRC   findResourceA(LPCSTR lpszName, LPSTR lpszType);
    128133        HRSRC   findResourceW(LPWSTR lpszName, LPWSTR lpszType);
     
    163168     Section *findSectionByAddr(ULONG addr);
    164169
    165         BOOL  storeSections();
     170        BOOL  storeSections(char *win32file);
    166171        BOOL  setMemFlags();
    167172        BOOL  setFixups(PIMAGE_BASE_RELOCATION prel);
     
    182187        Win32Resource            *winres;
    183188
    184         IMAGE_OPTIONAL_HEADER oh;
    185         IMAGE_FILE_HEADER     fh;
     189        IMAGE_OPTIONAL_HEADER oh;
     190        IMAGE_FILE_HEADER     fh;
    186191
    187192        ULONG                 errorState, entryPoint;
     
    193198        ULONG                 nrsections, imageSize, imageVirtBase, imageVirtEnd;
    194199        //OS/2 virtual base address
    195         ULONG                 baseAddress, realBaseAddress;
     200        ULONG                 realBaseAddress;
    196201        Section               section[MAX_SECTION];
    197202
    198203        char                 *szFileName, *fullpath;
     204        char                  szModule[CCHMAXPATH];
    199205
    200206        HINSTANCE             hinstance;
     
    226232extern ofstream fout;
    227233
     234//SvL: This structure is placed at the end of the first page of the image (header
     235//     page), so we can determine the Win32Image pointer from a HINSTANCE variable
     236//     (which is actually the address of the win32 module)
     237typedef struct
     238{
     239  Win32Image *image;
     240  ULONG       magic;
     241} WINIMAGE_LOOKUP;
     242
     243#define WINIMAGE_LOOKUPADDR(a)  (WINIMAGE_LOOKUP *)((ULONG)a + PAGE_SIZE - sizeof(WINIMAGE_LOOKUP))
     244
    228245#endif //__PE2LX__
    229246
Note: See TracChangeset for help on using the changeset viewer.