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

Subversion Repositories or1k_old

[/] [or1k_old/] [tags/] [start/] [insight/] [itcl/] [itk/] [win/] [dllEntryPoint.c] - Blame information for rev 1765

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

powered by: WebSVN 2.1.0

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