Ignore:
Timestamp:
Mar 6, 2001, 9:11:17 PM (24 years ago)
Author:
mike
Message:

Slightly modified for building with Watcom.

File:
1 edited

Legend:

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

    r5135 r5285  
    4646//******************************************************************************
    4747//******************************************************************************
    48 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
     48BOOL WINAPI OdinLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
    4949{
    5050   switch (fdwReason)
    5151   {
    5252   case DLL_PROCESS_ATTACH:
    53         return TRUE;
     53        return TRUE;
    5454
    5555   case DLL_THREAD_ATTACH:
    5656   case DLL_THREAD_DETACH:
    57         return TRUE;
     57        return TRUE;
    5858
    5959   case DLL_PROCESS_DETACH:
    60         ctordtorTerm();
    61         return TRUE;
     60#ifdef __IBMCPP__
     61        ctordtorTerm();
     62#endif
     63        return TRUE;
    6264   }
    6365   return FALSE;
     
    7173/* calling this function.                                                   */
    7274/****************************************************************************/
    73 unsigned long SYSTEM _DLL_InitTerm(unsigned long hModule, unsigned long
    74                                    ulFlag)
     75#ifdef __IBMCPP__
     76unsigned long SYSTEM _DLL_InitTerm(unsigned long hModule, unsigned long ulFlag)
     77#else
     78unsigned long APIENTRY LibMain(unsigned long hModule, unsigned long ulFlag)
     79#endif
    7580{
    76    size_t i;
    77    APIRET rc;
    7881
    7982   /*-------------------------------------------------------------------------*/
     
    8689      case 0 :
    8790      {
    88          DosQueryModuleName(hModule, CCHMAXPATH, dsoundPath);
     91         DosQueryModuleName(hModule, CCHMAXPATH, dsoundPath);
    8992         char *endofpath = strrchr(dsoundPath, '\\');
    9093         if(endofpath) *(endofpath+1) = 0;
     94#ifdef __IBMCPP__
    9195         ctordtorInit();
    92 
     96#endif
    9397         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    9498
    95          dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab);
    96          if(dllHandle == 0) 
    97                 return 0UL;
     99         dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&_Resource_PEResTab);
     100         if(dllHandle == 0)
     101                return 0UL;
    98102
    99103         break;
     
    102106      case 1 :
    103107         if(dllHandle) {
    104                 UnregisterLxDll(dllHandle);
     108                UnregisterLxDll(dllHandle);
    105109         }
    106110         break;
Note: See TracChangeset for help on using the changeset viewer.