Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix DDE code for Win95/98 |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | core-8-1-branch-old |
Files: | files | file ages | folders |
SHA1: |
ca77050cc6a9f034985131dc4509ab6f |
User & Date: | redman 1999-04-03 00:44:38.000 |
Context
1999-04-03
| ||
01:19 | * generic/tclThreadTest.c (ThreadExitProc): Fixed bug where static memory was being returned instead... check-in: 580aaa126e user: stanton tags: core-8-1-branch-old | |
00:44 | Fix DDE code for Win95/98 check-in: ca77050cc6 user: redman tags: core-8-1-branch-old | |
1999-04-02
| ||
23:48 | Add DDE package (moved from Tk). check-in: 26586b1d7e user: redman tags: core-8-1-branch-old | |
Changes
Changes to win/tclWinDde.c.
1 2 3 4 5 6 7 8 9 10 11 12 | /* * tclWinDde.c -- * * This file provides procedures that implement the "send" * command, allowing commands to be passed from interpreter * to interpreter. * * Copyright (c) 1997 by Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /* * tclWinDde.c -- * * This file provides procedures that implement the "send" * command, allowing commands to be passed from interpreter * to interpreter. * * Copyright (c) 1997 by 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: tclWinDde.c,v 1.1.2.2 1999/04/03 00:44:38 redman Exp $ */ #include "tclPort.h" #include <ddeml.h> /* * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the |
︙ | ︙ | |||
60 61 62 63 64 65 66 67 68 69 70 71 72 73 | } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; /* * The following variables cannot be placed in thread-local storage. * The Mutex ddeMutex guards access to the ddeInstance. */ static DWORD ddeInstance; /* The application instance handle given * to us by DdeInitialize. */ static int ddeIsServer = 0; TCL_DECLARE_MUTEX(ddeMutex) /* | > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; /* * The following variables cannot be placed in thread-local storage. * The Mutex ddeMutex guards access to the ddeInstance. */ static HSZ ddeService = 0; static DWORD ddeInstance; /* The application instance handle given * to us by DdeInitialize. */ static int ddeIsServer = 0; TCL_DECLARE_MUTEX(ddeMutex) /* |
︙ | ︙ | |||
136 137 138 139 140 141 142 | static void Initialize() { int nameFound = 0; | < < < < < < < < < < < < | | | | | | | < > > > > > > > | | | | < | < < < < < < < < < < | < < | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | static void Initialize() { int nameFound = 0; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); /* * See if the application is already registered; if so, remove its * current name from the registry. The deletion of the command * will take care of disposing of this entry. */ if (tsdPtr->interpListPtr != NULL) { nameFound = 1; } /* * Make sure that the DDE server is there. This is done only once, * add an exit handler tear it down. */ if (ddeInstance == 0) { Tcl_MutexLock(&ddeMutex); if (ddeInstance == 0) { if (DdeInitialize(&ddeInstance, DdeServerProc, CBF_SKIP_REGISTRATIONS | CBF_SKIP_UNREGISTRATIONS | CBF_FAIL_POKES, 0) != DMLERR_NO_ERROR) { DdeUninitialize(ddeInstance); ddeInstance = 0; } } Tcl_MutexUnlock(&ddeMutex); } if ((ddeService == 0) && (nameFound != 0)) { Tcl_MutexLock(&ddeMutex); if ((ddeService == 0) && (nameFound != 0)) { ddeIsServer = 1; Tcl_CreateExitHandler(DdeExitProc, NULL); ddeService = DdeCreateStringHandle(ddeInstance, "TclEval", 0); DdeNameService(ddeInstance, ddeService, 0L, DNS_REGISTER); } else { ddeIsServer = 0; } Tcl_MutexUnlock(&ddeMutex); } } /* |
︙ | ︙ |