|
/* $Header: /cvsroot/esrg/sfesrg/esrgpcpj/shared/tk_base/tkwin32dll.c,v 1.1.1.1 2001/06/13 05:11:41 dtashley Exp $ */ |
|
|
|
|
|
/* |
|
|
* tkWin32Dll.c -- |
|
|
* |
|
|
* This file contains a stub dll entry point. |
|
|
* |
|
|
* Copyright (c) 1995 Sun Microsystems, Inc. |
|
|
* |
|
|
* See the file "license.terms" for information on usage and redistribution |
|
|
* of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
|
|
* |
|
|
* RCS: @(#) $Id: tkwin32dll.c,v 1.1.1.1 2001/06/13 05:11:41 dtashley Exp $ |
|
|
*/ |
|
|
|
|
|
#include "tkWinInt.h" |
|
|
|
|
|
/* |
|
|
* The following declaration is for the VC++ DLL entry point. |
|
|
*/ |
|
|
|
|
|
BOOL APIENTRY DllMain _ANSI_ARGS_((HINSTANCE hInst, |
|
|
DWORD reason, LPVOID reserved)); |
|
|
|
|
|
/* |
|
|
*---------------------------------------------------------------------- |
|
|
* |
|
|
* DllEntryPoint -- |
|
|
* |
|
|
* This wrapper function is used by Borland to invoke the |
|
|
* initialization code for Tk. It simply calls the DllMain |
|
|
* routine. |
|
|
* |
|
|
* Results: |
|
|
* See DllMain. |
|
|
* |
|
|
* Side effects: |
|
|
* See DllMain. |
|
|
* |
|
|
*---------------------------------------------------------------------- |
|
|
*/ |
|
|
|
|
|
BOOL APIENTRY |
|
|
DllEntryPoint(hInst, reason, reserved) |
|
|
HINSTANCE hInst; /* Library instance handle. */ |
|
|
DWORD reason; /* Reason this function is being called. */ |
|
|
LPVOID reserved; /* Not used. */ |
|
|
{ |
|
|
return DllMain(hInst, reason, reserved); |
|
|
} |
|
|
|
|
|
/* |
|
|
*---------------------------------------------------------------------- |
|
|
* |
|
|
* DllMain -- |
|
|
* |
|
|
* DLL entry point. |
|
|
* |
|
|
* Results: |
|
|
* TRUE on sucess, FALSE on failure. |
|
|
* |
|
|
* Side effects: |
|
|
* None. |
|
|
* |
|
|
*---------------------------------------------------------------------- |
|
|
*/ |
|
|
|
|
|
BOOL APIENTRY |
|
|
DllMain(hInstance, reason, reserved) |
|
|
HINSTANCE hInstance; |
|
|
DWORD reason; |
|
|
LPVOID reserved; |
|
|
{ |
|
|
|
|
|
/* |
|
|
* If we are attaching to the DLL from a new process, tell Tk about |
|
|
* the hInstance to use. If we are detaching then clean up any |
|
|
* data structures related to this DLL. |
|
|
*/ |
|
|
|
|
|
if (reason == DLL_PROCESS_ATTACH) { |
|
|
TkWinXInit(hInstance); |
|
|
} else if (reason == DLL_PROCESS_DETACH) { |
|
|
TkWinXCleanup(hInstance); |
|
|
} |
|
|
return(TRUE); |
|
|
} |
|
|
|
|
|
|
|
|
/* $History: tkWin32Dll.c $ |
|
|
* |
|
|
* ***************** Version 1 ***************** |
|
|
* User: Dtashley Date: 1/02/01 Time: 3:11a |
|
|
* Created in $/IjuScripter, IjuConsole/Source/Tk Base |
|
|
* Initial check-in. |
|
|
*/ |
|
|
|
|
|
/* End of TKWIN32DLL.C */ |
|
1 |
|
/* $Header$ */ |
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 |
|
/* End of tkwin32dll.c */ |