1 |
dashley |
25 |
/* $Header: /cvsroot/esrg/sfesrg/esrgpcpj/shared/tk_base/tkwin32dll.c,v 1.1.1.1 2001/06/13 05:11:41 dtashley Exp $ */
|
2 |
|
|
|
3 |
|
|
/*
|
4 |
|
|
* tkWin32Dll.c --
|
5 |
|
|
*
|
6 |
|
|
* This file contains a stub dll entry point.
|
7 |
|
|
*
|
8 |
|
|
* Copyright (c) 1995 Sun Microsystems, Inc.
|
9 |
|
|
*
|
10 |
|
|
* See the file "license.terms" for information on usage and redistribution
|
11 |
|
|
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
12 |
|
|
*
|
13 |
|
|
* RCS: @(#) $Id: tkwin32dll.c,v 1.1.1.1 2001/06/13 05:11:41 dtashley Exp $
|
14 |
|
|
*/
|
15 |
|
|
|
16 |
|
|
#include "tkWinInt.h"
|
17 |
|
|
|
18 |
|
|
/*
|
19 |
|
|
* The following declaration is for the VC++ DLL entry point.
|
20 |
|
|
*/
|
21 |
|
|
|
22 |
|
|
BOOL APIENTRY DllMain _ANSI_ARGS_((HINSTANCE hInst,
|
23 |
|
|
DWORD reason, LPVOID reserved));
|
24 |
|
|
|
25 |
|
|
/*
|
26 |
|
|
*----------------------------------------------------------------------
|
27 |
|
|
*
|
28 |
|
|
* DllEntryPoint --
|
29 |
|
|
*
|
30 |
|
|
* This wrapper function is used by Borland to invoke the
|
31 |
|
|
* initialization code for Tk. It simply calls the DllMain
|
32 |
|
|
* routine.
|
33 |
|
|
*
|
34 |
|
|
* Results:
|
35 |
|
|
* See DllMain.
|
36 |
|
|
*
|
37 |
|
|
* Side effects:
|
38 |
|
|
* See DllMain.
|
39 |
|
|
*
|
40 |
|
|
*----------------------------------------------------------------------
|
41 |
|
|
*/
|
42 |
|
|
|
43 |
|
|
BOOL APIENTRY
|
44 |
|
|
DllEntryPoint(hInst, reason, reserved)
|
45 |
|
|
HINSTANCE hInst; /* Library instance handle. */
|
46 |
|
|
DWORD reason; /* Reason this function is being called. */
|
47 |
|
|
LPVOID reserved; /* Not used. */
|
48 |
|
|
{
|
49 |
|
|
return DllMain(hInst, reason, reserved);
|
50 |
|
|
}
|
51 |
|
|
|
52 |
|
|
/*
|
53 |
|
|
*----------------------------------------------------------------------
|
54 |
|
|
*
|
55 |
|
|
* DllMain --
|
56 |
|
|
*
|
57 |
|
|
* DLL entry point.
|
58 |
|
|
*
|
59 |
|
|
* Results:
|
60 |
|
|
* TRUE on sucess, FALSE on failure.
|
61 |
|
|
*
|
62 |
|
|
* Side effects:
|
63 |
|
|
* None.
|
64 |
|
|
*
|
65 |
|
|
*----------------------------------------------------------------------
|
66 |
|
|
*/
|
67 |
|
|
|
68 |
|
|
BOOL APIENTRY
|
69 |
|
|
DllMain(hInstance, reason, reserved)
|
70 |
|
|
HINSTANCE hInstance;
|
71 |
|
|
DWORD reason;
|
72 |
|
|
LPVOID reserved;
|
73 |
|
|
{
|
74 |
|
|
|
75 |
|
|
/*
|
76 |
|
|
* If we are attaching to the DLL from a new process, tell Tk about
|
77 |
|
|
* the hInstance to use. If we are detaching then clean up any
|
78 |
|
|
* data structures related to this DLL.
|
79 |
|
|
*/
|
80 |
|
|
|
81 |
|
|
if (reason == DLL_PROCESS_ATTACH) {
|
82 |
|
|
TkWinXInit(hInstance);
|
83 |
|
|
} else if (reason == DLL_PROCESS_DETACH) {
|
84 |
|
|
TkWinXCleanup(hInstance);
|
85 |
|
|
}
|
86 |
|
|
return(TRUE);
|
87 |
|
|
}
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
/* $History: tkWin32Dll.c $
|
91 |
|
|
*
|
92 |
|
|
* ***************** Version 1 *****************
|
93 |
|
|
* User: Dtashley Date: 1/02/01 Time: 3:11a
|
94 |
|
|
* Created in $/IjuScripter, IjuConsole/Source/Tk Base
|
95 |
|
|
* Initial check-in.
|
96 |
|
|
*/
|
97 |
|
|
|
98 |
|
|
/* End of TKWIN32DLL.C */ |