- Make ref counting a little more efficient
- Correct suspended process resumption
- Don't use sys/queue.h anymore
- Properly initialize the global semaphore across processes
- Create a mapped file for shared data structures
- Change some trace messages
- Allocate dynamic shared data from the mapped file
- Rework setting and retrieving lobby settings from shared memory
- Add infrastructure for syncronization after app launch
- Small documentation update
- Include some stuff missing from header
- Start on dp and dpl message infrastructure
- Unicode versions of player/group commands added
- Combined Connect/ConnectEx and Open/SecureOpen
- More implementation
diff --git a/dlls/dplayx/dplayx_main.c b/dlls/dplayx/dplayx_main.c
index 5d51c9e..25c1a51 100644
--- a/dlls/dplayx/dplayx_main.c
+++ b/dlls/dplayx/dplayx_main.c
@@ -1,7 +1,7 @@
/*
* DPLAYX.DLL LibMain
*
- * Copyright 1999 - Peter Hunnisett
+ * Copyright 1999,2000 - Peter Hunnisett
*
* contact <hunnise@nortelnetworks.com>
*/
@@ -17,34 +17,29 @@
BOOL WINAPI DPLAYX_LibMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
- TRACE( "(%p,0x%08lx,%p) & 0x%08lx\n", hinstDLL, fdwReason, lpvReserved, DPLAYX_dwProcessesAttached );
+ TRACE( "(%u,0x%08lx,%p) & 0x%08lx\n", hinstDLL, fdwReason, lpvReserved, DPLAYX_dwProcessesAttached );
switch ( fdwReason )
{
case DLL_PROCESS_ATTACH:
{
- if ( DPLAYX_dwProcessesAttached == 0 )
+ if ( DPLAYX_dwProcessesAttached++ == 0 )
{
/* First instance perform construction of global processor data */
- TRACE( "DPLAYX_dwProcessesAttached = 0x%08lx\n", DPLAYX_dwProcessesAttached );
- DPLAYX_ConstructData();
+ return DPLAYX_ConstructData();
}
- DPLAYX_dwProcessesAttached++;
-
break;
}
case DLL_PROCESS_DETACH:
{
- DPLAYX_dwProcessesAttached--;
-
- if ( DPLAYX_dwProcessesAttached == 0 )
+ if ( --DPLAYX_dwProcessesAttached == 0 )
{
- /* Last instance perform destruction of global processor data */
- DPLAYX_DestructData();
+ /* Last instance performs destruction of global processor data */
+ return DPLAYX_DestructData();
}
break;