diff options
author | chengyemao <chengyemao> | 2005-01-05 02:46:59 (GMT) |
---|---|---|
committer | chengyemao <chengyemao> | 2005-01-05 02:46:59 (GMT) |
commit | b4e37ef1007ae3e3e1f8eb4ffc538374c5f15cc7 (patch) | |
tree | a2af63acd25ba875baca34923be80215b4804a23 /win | |
parent | edb9d082bd03669e20196fc30502ebf67874f67f (diff) | |
download | tk-b4e37ef1007ae3e3e1f8eb4ffc538374c5f15cc7.zip tk-b4e37ef1007ae3e3e1f8eb4ffc538374c5f15cc7.tar.gz tk-b4e37ef1007ae3e3e1f8eb4ffc538374c5f15cc7.tar.bz2 |
Made the remarks of TkpUseWindow clearer regarding the embedding/embedded attachment protocol
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinEmbed.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index 371d5c3..4c4fb69 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinEmbed.c,v 1.16 2004/12/28 08:45:31 chengyemao Exp $ + * RCS: @(#) $Id: tkWinEmbed.c,v 1.17 2005/01/05 02:46:59 chengyemao Exp $ */ #include "tkWinInt.h" @@ -124,10 +124,14 @@ TkpTestembedCmd(clientData, interp, argc, argv) * * This procesure sends a TK_ATTACHWINDOW message to the window to * use. The returned value is either 0 (the window to use is already - * in use) or the hwnd of the window to use (the window to use is - * ready to serve as a container) or other values (the window to use - * needs to be confirmed since this protocol was not used before Tk85). - * + * in use or unable to be used as a container) or the hwnd of the + * window to use (the window to use is ready to serve as a container) + * or other values (the window to use needs to be confirmed since + * this protocol was not used before Tk85). This protocol is required + * in order to verify if the window to use is a valid container. + * Without an id verification, an invalid window attachment may cause + * unexpected crashes/panics (see bug # 1096074). + * * Results: * The return value is normally TCL_OK. If an error occurred (such as * if the argument does not identify a legal Windows window handle or @@ -195,7 +199,7 @@ TkpUseWindow(interp, tkwin, string) if(id == 0 || id != (long)hwnd) { char msg[256]; if(id == 0) { - sprintf(msg, "The window \"%s\" is either unable or already to be used as a container", string); + sprintf(msg, "The window \"%s\" is unable to be or has already been used as a container.", string); Tcl_SetResult(interp, msg, TCL_VOLATILE); return TCL_ERROR; } else { |