Changeset 4304 for trunk/src


Ignore:
Timestamp:
Sep 22, 2000, 6:35:09 AM (25 years ago)
Author:
bird
Message:

Changed hinstance to address of module.

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winexepe2lx.cpp

    r3375 r4304  
    1 /* $Id: winexepe2lx.cpp,v 1.6 2000-04-14 22:35:27 sandervl Exp $ */
     1/* $Id: winexepe2lx.cpp,v 1.7 2000-09-22 04:35:08 bird Exp $ */
    22
    33/*
     
    55 *
    66 * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
    7  * Copyright 1999 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
     7 * Copyright 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    88 *
    99 * Project Odin Software License can be found in LICENSE.TXT
  • trunk/src/kernel32/winexepe2lx.h

    r3375 r4304  
    1 /* $Id: winexepe2lx.h,v 1.2 2000-04-14 22:35:28 sandervl Exp $ */
     1/* $Id: winexepe2lx.h,v 1.3 2000-09-22 04:35:08 bird Exp $ */
    22
    33/*
     
    55 *
    66 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
    7  * Copyright 1999 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
     7 * Copyright 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    88 *
    99 * Project Odin Software License can be found in LICENSE.TXT
  • trunk/src/kernel32/winimagepe2lx.cpp

    r4167 r4304  
    1 /* $Id: winimagepe2lx.cpp,v 1.14 2000-09-02 21:14:50 bird Exp $ */
     1/* $Id: winimagepe2lx.cpp,v 1.15 2000-09-22 04:35:09 bird Exp $ */
    22
    33/*
     
    147147Win32Pe2LxImage::Win32Pe2LxImage(HINSTANCE hinstance, BOOL fWin32k)
    148148    : Win32ImageBase(hinstance),
    149     paSections(NULL), cSections(0), pNtHdrs(NULL), fWin32k(fWin32k)
     149    paSections(NULL), cSections(0), pNtHdrs(NULL), fWin32k(fWin32k),
     150    hmod(hinstance)
    150151{
    151152    setFullPath(szFileName);
     
    174175 *            Validate the NT headers.
    175176 *            Read the PE section table the set the RVAs in paSections.
     177 *            Set instance handle to address of header.
    176178 *            Locate and set the entrypoint.
    177179 *            Locate the resource directory (if any). (pResRootDir, ulRVAResourceSection)
     
    242244        return FALSE;
    243245    }
     246
     247    /* Set instance handle to address of header. */
     248    hinstance = (HINSTANCE)paSections[0].ulAddress;
    244249
    245250    /* Locate and set the entrypoint. */
     
    401406             * If there is a buffer overflow we'll allocate more storage and retry.
    402407             */
    403             rc = W32kQueryOTEs(hinstance, pQOte, cbQte);
     408            rc = W32kQueryOTEs(hmod, pQOte, cbQte);
    404409            while (rc == ERROR_BUFFER_OVERFLOW && cbQte < 32000);
    405410            {
     
    413418                }
    414419
    415                 rc = W32kQueryOTEs(hinstance, pQOte, cbQte);
     420                rc = W32kQueryOTEs(hmod, pQOte, cbQte);
    416421            }
    417422
     
    508513                                                   + sizeof(qsLObjrec_t) * pLrec->ctObj);
    509514                    }
    510                 if (pLrec->hmte == hinstance)
     515                if (pLrec->hmte == hmod)
    511516                    break;
    512517
     
    757762    ULONG       ulApiAddr;
    758763
    759     rc = DosQueryProcAddr(hinstance, 0, name, (PFN *)&ulApiAddr);
     764    rc = DosQueryProcAddr(hmod, 0, name, (PFN *)&ulApiAddr);
    760765    return rc == NO_ERROR ? ulApiAddr : 0;
    761766}
     
    778783    ULONG       ulApiAddr;
    779784
    780     rc = DosQueryProcAddr(hinstance, ordinal, NULL, (PFN *)&ulApiAddr);
     785    rc = DosQueryProcAddr(hmod, ordinal, NULL, (PFN *)&ulApiAddr);
    781786
    782787    return rc == NO_ERROR ? ulApiAddr : 0;
  • trunk/src/kernel32/winimagepe2lx.h

    r4097 r4304  
    1 /* $Id: winimagepe2lx.h,v 1.3 2000-08-27 03:20:37 bird Exp $ */
     1/* $Id: winimagepe2lx.h,v 1.4 2000-09-22 04:35:09 bird Exp $ */
    22
    33/*
     
    55 *
    66 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
    7  * Copyright 1999 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
     7 * Copyright 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    88 *
    99 * Project Odin Software License can be found in LICENSE.TXT
     
    6767    BOOL                fWin32k;    /* flag which indicates wether this is a Win32k loaded
    6868                                     * module (TRUE) or and Pe2Lx module (FALSE). */
     69    HMODULE hmod;                   /* OS/2 handle of the module. */
    6970};
    7071
Note: See TracChangeset for help on using the changeset viewer.