/* $Id: kLdr-win.c 2834 2006-10-26 00:09:19Z bird $ */ /** @file * * kLdr - The Dynamic Loader, Windows Specifics. * * Copyright (c) 2006 knut st. osmundsen * * * This file is part of kLdr. * * kLdr is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * kLdr 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 kLdr; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /******************************************************************************* * Header Files * *******************************************************************************/ #include #include #include "kLdrInternal.h" #include "kLdrHlp.h" /** * The DLL main function. * * @returns TRUE / FALSE. * @param hDllHandle The dll handle. * @param dwReason The reason we're being called. * @param lpReserved Reserved. */ BOOL __stdcall DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpReserved) { switch (dwReason) { case DLL_PROCESS_ATTACH: return TRUE; case DLL_PROCESS_DETACH: return TRUE; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: return TRUE; default: return FALSE; } }