2001-07-16 05:10:30 +00:00
|
|
|
/*
|
2016-06-27 14:56:38 +10:00
|
|
|
* Copyright (C) 2001, 2004, 2007, 2016 Internet Systems Consortium, Inc. ("ISC")
|
2001-07-16 05:10:30 +00:00
|
|
|
*
|
2016-06-27 14:56:38 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2001-07-16 05:10:30 +00:00
|
|
|
*/
|
2001-07-17 20:29:36 +00:00
|
|
|
|
2007-06-18 23:47:57 +00:00
|
|
|
/* $Id: DLLMain.c,v 1.6 2007/06/18 23:47:44 tbox Exp $ */
|
2001-07-16 05:10:30 +00:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include <signal.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Called when we enter the DLL
|
|
|
|
*/
|
|
|
|
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL,
|
|
|
|
DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
2016-06-27 14:56:38 +10:00
|
|
|
switch (fdwReason) {
|
2001-07-16 05:10:30 +00:00
|
|
|
/*
|
2016-06-27 14:56:38 +10:00
|
|
|
* The DLL is loading due to process
|
|
|
|
* initialization or a call to LoadLibrary.
|
2001-07-16 05:10:30 +00:00
|
|
|
*/
|
2016-06-27 14:56:38 +10:00
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
break;
|
|
|
|
|
2001-07-16 05:10:30 +00:00
|
|
|
/* The attached process creates a new thread. */
|
2016-06-27 14:56:38 +10:00
|
|
|
case DLL_THREAD_ATTACH:
|
|
|
|
break;
|
|
|
|
|
2001-07-16 05:10:30 +00:00
|
|
|
/* The thread of the attached process terminates. */
|
2016-06-27 14:56:38 +10:00
|
|
|
case DLL_THREAD_DETACH:
|
|
|
|
break;
|
2001-07-16 05:10:30 +00:00
|
|
|
|
|
|
|
/*
|
2016-06-27 14:56:38 +10:00
|
|
|
* The DLL is unloading from a process due to
|
|
|
|
* process termination or a call to FreeLibrary.
|
2001-07-16 05:10:30 +00:00
|
|
|
*/
|
2016-06-27 14:56:38 +10:00
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
break;
|
2001-07-16 05:10:30 +00:00
|
|
|
|
2016-06-27 14:56:38 +10:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2001-07-17 19:17:02 +00:00
|
|
|
return (TRUE);
|
2001-07-16 05:10:30 +00:00
|
|
|
}
|
|
|
|
|