/[pkg-mixmaster]/trunk/Mix/Src/dllmain.c
ViewVC logotype

Contents of /trunk/Mix/Src/dllmain.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30 - (show annotations) (download)
Tue Dec 11 20:59:26 2001 UTC (11 years, 5 months ago) by rabbi
File MIME type: text/plain
File size: 869 byte(s)
Changes for WIN32 Service support. service.c is totally re-written,
service.h is removed. main.c is now cleaner.

TODO: better solution to the Win32/Unix directory seperation issue. Sring
operations on every path is a lot of extra work. Why not fopen() ?
1 /* Mixmaster version 3 -- (C) 1999 Anonymizer Inc.
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,v 1.3 2001/12/11 20:59:26 rabbi Exp $ */
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
36

  ViewVC Help
Powered by ViewVC 1.1.5