Ignore:
Timestamp:
May 27, 2000, 1:30:36 PM (25 years ago)
Author:
sandervl
Message:

Don't call entrypoint of exe loaded as dll

File:
1 edited

Legend:

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

    r2811 r3615  
    1 /* $Id: windllpeldr.cpp,v 1.6 2000-02-17 14:08:51 sandervl Exp $ */
     1/* $Id: windllpeldr.cpp,v 1.7 2000-05-27 11:30:35 sandervl Exp $ */
    22
    33/*
     
    8080  fRet = Win32PeLdrImage::init(0);
    8181  dllEntryPoint = (WIN32DLLENTRY)entryPoint;
     82
     83  if(!(fh.Characteristics & IMAGE_FILE_DLL)) {
     84        //executable loaded as dll; don't call entrypoint
     85        dprintf(("WARNING: Exe %s loaded as dll; entrypoint not called", szFileName));
     86        dllEntryPoint = NULL;
     87  }
    8288  return fRet;
    8389}
Note: See TracChangeset for help on using the changeset viewer.