Ignore:
Timestamp:
Sep 14, 2002, 10:31:25 AM (23 years ago)
Author:
sandervl
Message:

YD: Load MMPM2 (MDM.DLL) on demand

File:
1 edited

Legend:

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

    r6646 r9232  
    1 /* $Id: initterm.cpp,v 1.17 2001-09-05 12:53:02 bird Exp $
     1/* $Id: initterm.cpp,v 1.18 2002-09-14 08:31:25 sandervl Exp $
    22 *
    33 * DLL entry point
     
    2727#define  INCL_DOSPROCESS
    2828#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    29 #include <stdlib.h>
    30 #include <stdio.h>
    3129#include <string.h>
    32 #include <odin.h>
    3330#include <win32type.h>
    34 #include <winconst.h>
    3531#include <odinlx.h>
    3632#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3733#include <initdll.h>
    3834
    39 extern "C" {
    40  //Win32 resource table (produced by wrc)
    41  extern DWORD _Resource_PEResTab;
    42 }
     35char dsoundPath[CCHMAXPATH] = "";
    4336
    44 char dsoundPath[CCHMAXPATH] = "";
    45 static HMODULE dllHandle = 0;
    46 
    47 //******************************************************************************
    48 //******************************************************************************
    49 BOOL WINAPI OdinLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
    50 {
    51    switch (fdwReason)
    52    {
    53    case DLL_PROCESS_ATTACH:
    54         return TRUE;
    55 
    56    case DLL_THREAD_ATTACH:
    57    case DLL_THREAD_DETACH:
    58         return TRUE;
    59 
    60    case DLL_PROCESS_DETACH:
    61         ctordtorTerm();
    62         return TRUE;
    63    }
    64    return FALSE;
    65 }
    6637/****************************************************************************/
    6738/* _DLL_InitTerm is the function that gets called by the operating system   */
     
    8960
    9061         ctordtorInit();
    91 
    9262         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    93 
    94          dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&_Resource_PEResTab);
    95          if(dllHandle == 0)
    96                 return 0UL;
    97 
    98          break;
     63         return inittermDSound(hModule, ulFlag);
    9964      }
    10065
    10166      case 1 :
    102          if(dllHandle) {
    103                 UnregisterLxDll(dllHandle);
    104          }
     67         inittermDSound(hModule, ulFlag);
     68         ctordtorTerm();
    10569         break;
    10670      default  :
Note: See TracChangeset for help on using the changeset viewer.