1*ebfedea0SLionel Sambuc /* $NetBSD: dll.c,v 1.1.1.1 2011/04/13 18:15:33 elric Exp $ */ 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel Sambuc /*********************************************************************** 4*ebfedea0SLionel Sambuc * Copyright (c) 2009, Secure Endpoints Inc. 5*ebfedea0SLionel Sambuc * All rights reserved. 6*ebfedea0SLionel Sambuc * 7*ebfedea0SLionel Sambuc * Redistribution and use in source and binary forms, with or without 8*ebfedea0SLionel Sambuc * modification, are permitted provided that the following conditions 9*ebfedea0SLionel Sambuc * are met: 10*ebfedea0SLionel Sambuc * 11*ebfedea0SLionel Sambuc * - Redistributions of source code must retain the above copyright 12*ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer. 13*ebfedea0SLionel Sambuc * 14*ebfedea0SLionel Sambuc * - Redistributions in binary form must reproduce the above copyright 15*ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer in 16*ebfedea0SLionel Sambuc * the documentation and/or other materials provided with the 17*ebfedea0SLionel Sambuc * distribution. 18*ebfedea0SLionel Sambuc * 19*ebfedea0SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20*ebfedea0SLionel Sambuc * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21*ebfedea0SLionel Sambuc * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 22*ebfedea0SLionel Sambuc * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 23*ebfedea0SLionel Sambuc * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 24*ebfedea0SLionel Sambuc * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25*ebfedea0SLionel Sambuc * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26*ebfedea0SLionel Sambuc * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*ebfedea0SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 28*ebfedea0SLionel Sambuc * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29*ebfedea0SLionel Sambuc * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 30*ebfedea0SLionel Sambuc * OF THE POSSIBILITY OF SUCH DAMAGE. 31*ebfedea0SLionel Sambuc * 32*ebfedea0SLionel Sambuc **********************************************************************/ 33*ebfedea0SLionel Sambuc 34*ebfedea0SLionel Sambuc #include<windows.h> 35*ebfedea0SLionel Sambuc 36*ebfedea0SLionel Sambuc HINSTANCE _krb5_hInstance = NULL; 37*ebfedea0SLionel Sambuc 38*ebfedea0SLionel Sambuc BOOL WINAPI DllMain(HINSTANCE hinstDLL, 39*ebfedea0SLionel Sambuc DWORD fdwReason, 40*ebfedea0SLionel Sambuc LPVOID lpvReserved) 41*ebfedea0SLionel Sambuc { 42*ebfedea0SLionel Sambuc switch (fdwReason) { 43*ebfedea0SLionel Sambuc case DLL_PROCESS_ATTACH: 44*ebfedea0SLionel Sambuc 45*ebfedea0SLionel Sambuc _krb5_hInstance = hinstDLL; 46*ebfedea0SLionel Sambuc return TRUE; 47*ebfedea0SLionel Sambuc 48*ebfedea0SLionel Sambuc case DLL_PROCESS_DETACH: 49*ebfedea0SLionel Sambuc return FALSE; 50*ebfedea0SLionel Sambuc 51*ebfedea0SLionel Sambuc case DLL_THREAD_ATTACH: 52*ebfedea0SLionel Sambuc return FALSE; 53*ebfedea0SLionel Sambuc 54*ebfedea0SLionel Sambuc case DLL_THREAD_DETACH: 55*ebfedea0SLionel Sambuc return FALSE; 56*ebfedea0SLionel Sambuc } 57*ebfedea0SLionel Sambuc 58*ebfedea0SLionel Sambuc return FALSE; 59*ebfedea0SLionel Sambuc } 60*ebfedea0SLionel Sambuc 61