Changeset 3704 for trunk/src


Ignore:
Timestamp:
Jun 14, 2000, 4:28:43 AM (25 years ago)
Author:
phaller
Message:

Fix: StarCraft STORM.DLL requires reserved DllEntryPoint parameter

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

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

    r3074 r3704  
    1 /* $Id: heapshared.cpp,v 1.5 2000-03-10 16:11:58 sandervl Exp $ */
     1/* $Id: heapshared.cpp,v 1.6 2000-06-14 02:27:33 phaller Exp $ */
    22/*
    33 * Shared heap functions for OS/2
     
    134134
    135135  /* round the size up to a multiple of 4K */
    136   *size = (*size / 4096) * 4096 + 4096;
     136  // *size = (*size / 4096) * 4096 + 4096;
     137  // @@@PH speed improvement
     138  *size = (*size + 4096) & 0xFFFFF000;
    137139  *size = max(*size, INCR_HEAPSIZE);
    138140
  • trunk/src/kernel32/windllbase.cpp

    r3483 r3704  
    1 /* $Id: windllbase.cpp,v 1.13 2000-05-02 20:53:14 sandervl Exp $ */
     1/* $Id: windllbase.cpp,v 1.14 2000-06-14 02:27:33 phaller Exp $ */
    22
    33/*
     
    421421
    422422  dprintf(("attachProcess to dll %s", szModule));
    423 
    424   rc = dllEntryPoint(hinstance, DLL_PROCESS_ATTACH, 0);
     423 
     424  // @@@PH 2000/06/13 lpvReserved, Starcraft STORM.DLL
     425  // if DLL_PROCESS_ATTACH, lpvReserved is NULL for dynamic loads
     426  //   and non-NULL for static loads.
     427  // same goes for process termination
     428  LPVOID lpvReserved;
     429 
     430  if (isDynamicLib())
     431    lpvReserved = NULL;
     432  else
     433    lpvReserved = (LPVOID)0xdeadface; // some arbitrary value
     434 
     435  rc = dllEntryPoint(hinstance, DLL_PROCESS_ATTACH, lpvReserved);
    425436
    426437  dprintf(("attachProcess to dll %s DONE", szModule));
     
    461472  fUnloaded = TRUE;
    462473  sel = SetWin32TIB();
    463   rc = dllEntryPoint(hinstance, DLL_PROCESS_DETACH, 0);
     474 
     475  // @@@PH 2000/06/13 lpvReserved, Starcraft STORM.DLL
     476  // if DLL_PROCESS_ATTACH, lpvReserved is NULL for dynamic loads
     477  //   and non-NULL for static loads.
     478  // same goes for process termination
     479  LPVOID lpvReserved;
     480 
     481  if (isDynamicLib())
     482    lpvReserved = NULL;
     483  else
     484    lpvReserved = (LPVOID)0xdeadface; // some arbitrary value
     485 
     486  rc = dllEntryPoint(hinstance, DLL_PROCESS_DETACH, lpvReserved);
     487 
    464488  SetFS(sel);
    465489  tlsDetachThread();    //destroy TLS (main thread)
     
    481505
    482506  dprintf(("attachThread to dll %s", szModule));
    483 
     507 
    484508  rc = dllEntryPoint(hinstance, DLL_THREAD_ATTACH, 0);
    485509
     
    499523
    500524  dprintf(("detachThread from dll %s", szModule));
    501 
     525 
    502526  rc =  dllEntryPoint(hinstance, DLL_THREAD_DETACH, 0);
    503527  return rc;
  • trunk/src/kernel32/windllbase.h

    r3483 r3704  
    1 /* $Id: windllbase.h,v 1.2 2000-05-02 20:53:14 sandervl Exp $ */
     1/* $Id: windllbase.h,v 1.3 2000-06-14 02:27:33 phaller Exp $ */
    22
    33/*
     
    8080        void      decDynamicLib();
    8181        BOOL      isDynamicLib()   { return nrDynamicLibRef != 0; };
    82 
     82 
    8383        void      setUnloadOrder(Win32ImageBase *parent);
    8484
     
    141141        BOOL          fLoadLibrary;
    142142        BOOL          fDisableUnload;
    143 
     143 
    144144private:
    145145static  Queue         loadLibDlls;
Note: See TracChangeset for help on using the changeset viewer.