Overview
| Artifact ID: | 2f2e89bdcae37e8d61aae2c7825dec7766b565de |
|---|---|
| Ticket: | 648022ffffffffffffffffffffffffffffffffff
Dde package crashing under Windows 98 |
| User & Date: | dkf on 2016-07-10 08:10:13 |
Changes
- closedate changed to: "2457579.84043471"
- closer changed to: "dkf"
- comment changed to:
I use tcldde12.dll to implement Drag-n-Drop (thru send command emulation) within our medical imaging software. Under Windows 98, the originating half of the process often (not always) crashes. I believe I have tracked this down to a possible improper use of DdeCreateDataHandle(), DdeClientTransaction() and DdeFreeDataHandle() in the tclWinDde.c file within the tcl8.4.1 win directory. While my experience with these functions is limited to this implementation and the online MSDN documents, it is my interpretation that a data handle created with DdeCreateDataHandle() can be used for "read only", once it has been successfully passed to a client using the DdeClientTransaction(). I believe that the use of DdeFreeDataHandle() violates this "read only" usage restriction. My workaround to this problem is to set the ddeItemData variable to NULL when a successful DdeClientTransaction() occurs (two places). This prevents the DdeFreeDataHandle(ddeItemData) line in the cleanup section of the code from crashing. I've marked the addional lines in the attached code with my initials, AGL. I would hope that someone with a better understanding of the Dde calls might take a look. Maybe I've misinterpreted the Dde documentation and just created a memory leak, but if so, I need a new solution which prevents the crashes. Thanks for your time.
- icomment:
Win98 not supported any more; open a new bug if the problems are observable on a currently supported OS.
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"