Changeset 3615 for trunk/src/kernel32


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

Don't call entrypoint of exe loaded as dll

Location:
trunk/src/kernel32
Files:
2 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}
  • trunk/src/kernel32/wintls.cpp

    r2802 r3615  
    1 /* $Id: wintls.cpp,v 1.9 2000-02-16 14:22:13 sandervl Exp $ */
     1/* $Id: wintls.cpp,v 1.10 2000-05-27 11:30:36 sandervl Exp $ */
    22/*
    33 * Win32 TLS API functions
     
    136136DWORD WIN32API TlsAlloc()
    137137{
    138   dprintf(("KERNEL32:  TlsAlloc\n"));
    139   return(O32_TlsAlloc());
     138 DWORD index;
     139
     140  index = O32_TlsAlloc();
     141  dprintf(("KERNEL32: TlsAlloc returned %d", index));
     142  return index;
    140143}
    141144//******************************************************************************
     
    143146BOOL WIN32API TlsFree(DWORD index)
    144147{
    145   dprintf(("KERNEL32:  TlsFree\n"));
     148  dprintf(("KERNEL32: TlsFree %d", index));
    146149  return(O32_TlsFree(index));
    147150}
     
    153156
    154157  rc = O32_TlsGetValue(index);
    155 //  dprintf(("KERNEL32:  TlsGetValue %d returned %X\n", index, rc));
     158  dprintf2(("KERNEL32:  TlsGetValue %d returned %X\n", index, rc));
    156159  return(rc);
    157160}
     
    160163BOOL WIN32API TlsSetValue(DWORD index, LPVOID val)
    161164{
    162 //  dprintf(("KERNEL32:  TlsSetValue\n"));
     165  dprintf2(("KERNEL32:  TlsSetValue\n"));
    163166  return(O32_TlsSetValue(index, val));
    164167}
Note: See TracChangeset for help on using the changeset viewer.