Changeset 12461


Ignore:
Timestamp:
Nov 29, 1999, 1:33:38 AM (25 years ago)
Author:
bird
Message:

Made sure Kernel32 is the first entry in the import module name table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/win32k/pe2lx/pe2lx.cpp

    r12343 r12461  
    1 /* $Id: pe2lx.cpp,v 1.11 1999-11-16 18:07:55 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.12 1999-11-29 00:33:38 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    17081708 *            Check and read directories for imports and relocations.
    17091709 *            Create necessary Buffered RVA Readers.
     1710 *            Make sure kernel32 is the first imported module.
    17101711 *            Initiate the import variables (if any imports):
    17111712 *                Loop thru the import descriptiors looking for the lowest FirstThunk RVA. (ulRVAOrgFirstThunk and ulRVAFirstThunk)
     
    18701871    }
    18711872
     1873    /* Make sure kernel32 is the first imported module */
     1874    if (rc == NO_ERROR)
     1875        rc = addModule("KERNEL32.DLL", (PULONG)SSToDS(&ul));
     1876
    18721877    /* initiate the import variables */
    18731878    if (fImports && rc == NO_ERROR)
     
    19061911
    19071912    /* read start of the first basereloc chunk */
    1908     if (fBaseRelocs)
     1913    if (fBaseRelocs && rc == NO_ERROR)
    19091914        rc = pRelocReader->readAtRVA(ulRVABaseReloc, SSToDS(&BaseReloc), sizeof(BaseReloc));
     1915
    19101916
    19111917    /*
     
    34933499 *            IF no enough memory THEN (try) allocate more.
    34943500 *            IF Function ordinal THEN convert it to an ordinal number.
     3501 *            Make sure kernel32 is the first imported module.
    34953502 *            Add module name.
    34963503 *            IF not forwarder to ordinal THEN Add name to imported procedure table.
     
    36063613    else
    36073614        ulFnOrdinal = 0; /* not ordinal! */
     3615
     3616    /* Make sure kernel32 is the first imported module */
     3617    if (offCurImpModuleName == 0)
     3618    {
     3619        rc = addModule("KERNEL32.DLL", (PULONG)SSToDS(&ulModuleOrdinal));
     3620        if (rc != NO_ERROR)
     3621            return rc;
     3622    }
    36083623
    36093624    /* Add module name. */
Note: See TracChangeset for help on using the changeset viewer.