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