dllmain.c (889B)
1 /* Mixmaster version 3.0 -- (C) 1999 - 2006 Anonymizer Inc. and others. 2 3 Mixmaster may be redistributed and modified under certain conditions. 4 This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 5 ANY KIND, either express or implied. See the file COPYRIGHT for 6 details. 7 8 Mixmaster DLL startup 9 $Id: dllmain.c 934 2006-06-24 13:40:39Z rabbi $ */ 10 11 12 #include "mix3.h" 13 #ifdef WIN32 14 int WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) 15 { 16 switch (fdwReason) { 17 case DLL_PROCESS_ATTACH: 18 if(!is_nt_service()) { 19 rnd_state = RND_WILLSEED; 20 mix_init(NULL); 21 if (rnd_state == RND_WILLSEED) 22 rnd_state = RND_NOTSEEDED; 23 } 24 break; 25 case DLL_PROCESS_DETACH: 26 if(!is_nt_service()) 27 mix_exit(); 28 break; 29 case DLL_THREAD_ATTACH: 30 case DLL_THREAD_DETACH: 31 return(0); 32 } 33 return(1); 34 } 35 #endif /* WIN32 */