mirror of
https://github.com/reactos/wine.git
synced 2024-11-30 07:00:30 +00:00
88d89f93ea
- Added start for global data manipulation - TODO list updated - Added some missing header file definitions - Added the ansi versions of dplay and dplobby - Fixed invalid macro for IDirectPlay4 - Cleaned up compiler warnings - More implementation, bug fixes and critical region protection
59 lines
1.1 KiB
C
59 lines
1.1 KiB
C
/*
|
|
* DPLAYX.DLL LibMain
|
|
*
|
|
* Copyright 1999 - Peter Hunnisett
|
|
*
|
|
* contact <hunnise@nortelnetworks.com>
|
|
*/
|
|
|
|
#include "winbase.h"
|
|
#include "debugtools.h"
|
|
#include "dplayx_global.h"
|
|
|
|
DEFAULT_DEBUG_CHANNEL(dplay)
|
|
|
|
static DWORD DPLAYX_dwProcessesAttached = 0;
|
|
|
|
BOOL WINAPI DPLAYX_LibMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
|
{
|
|
switch ( fdwReason )
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
{
|
|
|
|
if ( DPLAYX_dwProcessesAttached == 0 )
|
|
{
|
|
/* First instance perform construction of global processor data */
|
|
DPLAYX_ConstructData();
|
|
}
|
|
|
|
DPLAYX_dwProcessesAttached++;
|
|
|
|
break;
|
|
}
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
{
|
|
|
|
DPLAYX_dwProcessesAttached--;
|
|
|
|
if ( DPLAYX_dwProcessesAttached == 0 )
|
|
{
|
|
/* Last instance perform destruction of global processor data */
|
|
DPLAYX_DestructData();
|
|
}
|
|
|
|
break;
|
|
}
|
|
|
|
case DLL_THREAD_ATTACH: /* Do nothing */
|
|
case DLL_THREAD_DETACH: /* Do nothing */
|
|
break;
|
|
default:
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
}
|