Ignore:
Timestamp:
Mar 14, 2001, 12:13:28 AM (24 years ago)
Author:
hugh
Message:

Synced with WINE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/DPlayX/dplayx_main.cpp

    r5135 r5311  
    1 // $Id: dplayx_main.cpp,v 1.3 2001-02-14 15:14:41 sandervl Exp $
     1// $Id: dplayx_main.cpp,v 1.4 2001-03-13 23:13:27 hugh Exp $
    22/*
    33 * DPLAYX.DLL LibMain
     
    2323
    2424DEFAULT_DEBUG_CHANNEL(dplay);
    25 
    26 DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
    27 
    28 static DWORD DPLAYX_dwProcessesAttached = 0;
     25DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    2926
    3027/* This is a globally exported variable at ordinal 6 of DPLAYX.DLL */
     
    3431{
    3532
    36   TRACE( "(%u,0x%08lx,%p) & 0x%08lx\n", hinstDLL, fdwReason, lpvReserved, DPLAYX_dwProcessesAttached );
     33  TRACE( "(%u,0x%08lx,%p) & 0x%08lx\n", hinstDLL, fdwReason, lpvReserved, gdwDPlaySPRefCount );
    3734
    3835  switch ( fdwReason )
    3936  {
    4037    case DLL_PROCESS_ATTACH:
    41     {
    42 
    43       if ( DPLAYX_dwProcessesAttached++ == 0 )
    44       {
    4538        /* First instance perform construction of global processor data */
    4639        return DPLAYX_ConstructData();
    47       }
    48 
    49       break;
    50     }
    5140
    5241    case DLL_PROCESS_DETACH:
    5342    {
    54 
    55       if ( --DPLAYX_dwProcessesAttached == 0 )
    56       {
    57         BOOL rc;
    58         /* Last instance performs destruction of global processor data */
    59         rc = DPLAYX_DestructData();
     43      BOOL rc;
     44      /* Last instance performs destruction of global processor data */
     45      rc = DPLAYX_DestructData();
    6046#ifdef __WIN32OS2__
     47      if(gdwDPlaySPRefCount==0) // only do this the last time ?
    6148        ctordtorTerm();
    6249#endif
    6350        return rc;
    64       }
    6551
    6652      break;
Note: See TracChangeset for help on using the changeset viewer.