OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [win/] [dllEntryPoint.c] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
2
 * dllEntryPoint.c --
3
 *
4
 *      This file implements the Dll entry point as needed by Windows.
5
 */
6
 
7
#define WIN32_LEAN_AND_MEAN
8
#include <windows.h>
9
#include <tcl.h>
10
 
11
/* CYGNUS LOCAL */
12
#ifdef __CYGWIN32__
13
/*
14
 * The following declaration is for the VC++ DLL entry point.
15
 */
16
 
17
BOOL APIENTRY           DllMain _ANSI_ARGS_((HINSTANCE hInst,
18
                            DWORD reason, LPVOID reserved));
19
 
20
/* cygwin32 requires an impure pointer variable, which must be
21
   explicitly initialized when the DLL starts up.  */
22
struct _reent *_impure_ptr;
23
extern struct _reent *_imp__reent_data;
24
 
25
/*
26
 *----------------------------------------------------------------------
27
 *
28
 * DllMain --
29
 *
30
 *      DLL entry point.
31
 *
32
 * Results:
33
 *      TRUE on sucess, FALSE on failure.
34
 *
35
 * Side effects:
36
 *      None.
37
 *
38
 *----------------------------------------------------------------------
39
 */
40
 
41
BOOL APIENTRY
42
DllMain(hInstance, reason, reserved)
43
    HINSTANCE hInstance;
44
    DWORD reason;
45
    LPVOID reserved;
46
{
47
    /* CYGNUS LOCAL */
48
    /* cygwin32 requires the impure data pointer to be initialized
49
       when the DLL starts up.  */
50
    _impure_ptr = _imp__reent_data;
51
    /* END CYGNUS LOCAL */
52
 
53
    return(TRUE);
54
}
55
 
56
/* END CYGNUS LOCAL */
57
#else /* __CYGWIN32__ */
58
 
59
#if defined(_MSC_VER)
60
#   define DllEntryPoint DllMain
61
#endif
62
 
63
/*
64
 *----------------------------------------------------------------------
65
 *
66
 * DllEntryPoint --
67
 *
68
 *      This wrapper function is used by Windows to invoke the
69
 *      initialization code for the DLL.  If we are compiling
70
 *      with Visual C++, this routine will be renamed to DllMain.
71
 *
72
 * Results:
73
 *      Returns TRUE;
74
 *
75
 * Side effects:
76
 *      None.
77
 *
78
 *----------------------------------------------------------------------
79
 */
80
 
81
BOOL APIENTRY
82
DllEntryPoint(hInst, reason, reserved)
83
    HINSTANCE hInst;            /* Library instance handle. */
84
    DWORD reason;               /* Reason this function is being called. */
85
    LPVOID reserved;            /* Not used. */
86
{
87
    return TRUE;
88
}
89
 
90
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.