diff options
author | hobbs <hobbs> | 2002-12-06 23:29:37 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-12-06 23:29:37 (GMT) |
commit | 0eca49db89aecf4e7296815f83b24e03d588041d (patch) | |
tree | 5929fe9f8d605ca8e874bea4a8c835657cd5367d /win/tkWin32Dll.c | |
parent | cc3719ce8bba373a11fa24203ddfaa0bda21fea0 (diff) | |
download | tk-0eca49db89aecf4e7296815f83b24e03d588041d.zip tk-0eca49db89aecf4e7296815f83b24e03d588041d.tar.gz tk-0eca49db89aecf4e7296815f83b24e03d588041d.tar.bz2 |
* win/tkWinX.c (TkWinXInit): Move cleanup into an exit handler
* win/tkWin32Dll.c (DllMain): to ensure that it will be called
* win/tkWinWm.c (TkWinWmCleanup): without having to unload the dll.
Also reset the static int initialized on cleanup to allow reinit.
Diffstat (limited to 'win/tkWin32Dll.c')
-rw-r--r-- | win/tkWin32Dll.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/win/tkWin32Dll.c b/win/tkWin32Dll.c index cc77be7..c8e03c1 100644 --- a/win/tkWin32Dll.c +++ b/win/tkWin32Dll.c @@ -8,7 +8,7 @@ * 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.4 2000/03/31 09:24:26 hobbs Exp $ + * RCS: @(#) $Id: tkWin32Dll.c,v 1.5 2002/12/06 23:29:37 hobbs Exp $ */ #include "tkWinInt.h" @@ -52,10 +52,13 @@ DllEntryPoint(hInst, reason, reserved) * * DllMain -- * - * DLL entry point. + * DLL entry point. It is not necessary to do anything here as + * Tk will initialize and clean up after itself through other + * methods, in order to be consistent whether the build is static + * or dynamic. * * Results: - * TRUE on sucess, FALSE on failure. + * Always TRUE. * * Side effects: * None. @@ -69,17 +72,5 @@ DllMain(hInstance, reason, reserved) 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); + return (TRUE); } |