Defer to standard scrolling APIs for non-flatSB specific functions so
[wine/multimedia.git] / dlls / dplayx / dplayx_main.c
blobc09b8dde617f060d0eaeb20eb2cfb2c6cefd07a5
1 /*
2 * DPLAYX.DLL LibMain
4 * Copyright 1999 - Peter Hunnisett
6 * contact <hunnise@nortelnetworks.com>
7 */
9 #include "winbase.h"
10 #include "debugtools.h"
11 #include "dplayx_global.h"
13 DEFAULT_DEBUG_CHANNEL(dplay)
15 static DWORD DPLAYX_dwProcessesAttached = 0;
17 BOOL WINAPI DPLAYX_LibMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
19 switch ( fdwReason )
21 case DLL_PROCESS_ATTACH:
24 if ( DPLAYX_dwProcessesAttached == 0 )
26 /* First instance perform construction of global processor data */
27 DPLAYX_ConstructData();
30 DPLAYX_dwProcessesAttached++;
32 break;
35 case DLL_PROCESS_DETACH:
38 DPLAYX_dwProcessesAttached--;
40 if ( DPLAYX_dwProcessesAttached == 0 )
42 /* Last instance perform destruction of global processor data */
43 DPLAYX_DestructData();
46 break;
49 case DLL_THREAD_ATTACH: /* Do nothing */
50 case DLL_THREAD_DETACH: /* Do nothing */
51 break;
52 default:
53 break;
57 return TRUE;