Changeset 2649 for trunk/src/shell32


Ignore:
Timestamp:
Feb 5, 2000, 3:12:20 AM (26 years ago)
Author:
sandervl
Message:

Rewrote dll entrypoint

Location:
trunk/src/shell32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/initterm.cpp

    r1252 r2649  
    1 /* $Id: initterm.cpp,v 1.9 1999-10-11 20:17:10 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.10 2000-02-05 02:10:15 sandervl Exp $ */
    22
    33/*
     
    3333#include <odin.h>
    3434#include <win32type.h>
     35#include <winconst.h>
    3536#include <odinlx.h>
    3637#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
     
    4849BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad);
    4950
    50 /*-------------------------------------------------------------------*/
    51 /* A clean up routine registered with DosExitList must be used if    */
    52 /* runtime calls are required and the runtime is dynamically linked. */
    53 /* This will guarantee that this clean up routine is run before the  */
    54 /* library DLL is terminated.                                        */
    55 /*-------------------------------------------------------------------*/
    56 static void APIENTRY cleanup(ULONG reason);
     51//******************************************************************************
     52//******************************************************************************
     53BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     54{
     55   switch (fdwReason)
     56   {
     57   case DLL_PROCESS_ATTACH:
     58   case DLL_THREAD_ATTACH:
     59   case DLL_THREAD_DETACH:
     60        return Shell32LibMain(hinstDLL, fdwReason, fImpLoad);
    5761
    58 
     62   case DLL_PROCESS_DETACH:
     63        Shell32LibMain(hinstDLL, fdwReason, fImpLoad);
     64        _ctordtorTerm();
     65        return TRUE;
     66   }
     67   return FALSE;
     68}
    5969/****************************************************************************/
    6070/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8393         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    8494
    85          /*******************************************************************/
    86          /* A DosExitList routine must be used to clean up if runtime calls */
    87          /* are required and the runtime is dynamically linked.             */
    88          /*******************************************************************/
    89 
    90          if(RegisterLxDll(hModule, Shell32LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
     95         if(RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab) == FALSE)
    9196                return 0UL;
    92 
    93          rc = DosExitList(0x0000F000|EXLST_ADD, cleanup);
    94          if(rc)
    95                 return 0UL;
    9697
    9798         break;
     
    108109   return 1UL;
    109110}
    110 
    111 
    112 static void APIENTRY cleanup(ULONG ulReason)
    113 {
    114    _ctordtorTerm();
    115    DosExitList(EXLST_EXIT, cleanup);
    116    return ;
    117 }
     111//******************************************************************************
     112//******************************************************************************
  • trunk/src/shell32/makefile

    r2477 r2649  
    1 # $Id: makefile,v 1.18 2000-01-18 22:27:55 sandervl Exp $
     1# $Id: makefile,v 1.19 2000-02-05 02:10:16 sandervl Exp $
    22
    33#
     
    1818CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE)
    1919CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE)
    20 
    21 
    22 RC = $(PDWIN32_TOOLS)\wrc
    23 RCFLAGS = -s -I. -I$(CPPMAIN)\include -I$(PDWIN32_INCLUDE) -I$(PDWIN32_INCLUDE)\win
    2420
    2521TARGET = shell32
     
    6056
    6157
    62 initterm.obj:     initterm.cpp
     58initterm.obj:     initterm.cpp $(PDWIN32_INCLUDE)\exitlist.h
    6359brsfolder.obj:    brsfolder.cpp
    6460classes.obj:      classes.cpp
Note: See TracChangeset for help on using the changeset viewer.