2011-06-16 23:55:20 +00:00
|
|
|
/* IPXWrapper - Stub DLL functions
|
|
|
|
* Copyright (C) 2008-2011 Daniel Collins <solemnwarning@solemnwarning.net>
|
2008-12-09 21:36:07 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 as published by
|
|
|
|
* the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
|
|
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2011-08-28 21:27:06 +00:00
|
|
|
#include "common.h"
|
2012-12-01 14:34:14 +00:00
|
|
|
#include "config.h"
|
2011-08-28 21:27:06 +00:00
|
|
|
|
2011-05-08 20:57:07 +00:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE me, DWORD why, LPVOID res) {
|
2012-10-21 10:26:52 +00:00
|
|
|
if(why == DLL_PROCESS_ATTACH)
|
|
|
|
{
|
2011-09-18 14:36:24 +00:00
|
|
|
log_open("ipxwrapper.log");
|
2011-07-13 22:56:19 +00:00
|
|
|
|
2012-12-01 14:34:14 +00:00
|
|
|
min_log_level = get_main_config().log_level;
|
2012-10-21 10:26:52 +00:00
|
|
|
}
|
|
|
|
else if(why == DLL_PROCESS_DETACH)
|
|
|
|
{
|
2011-09-11 13:28:41 +00:00
|
|
|
unload_dlls();
|
2011-07-13 22:56:19 +00:00
|
|
|
log_close();
|
2008-12-09 21:36:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|