#include <tk.h>
int Tk_RegisterInterp(interp, name, tkwin)
Tk_RegisterInterp is invoked to associate a name (name) with a Tcl interpreter (interp) and record that association in a well-known property of a particular display (the one containing tkwin). After this procedure has been invoked, other interpreters in the display will be able to use the send command to invoke operations remotely in interp. The procedure returns TCL_OK if the registration completed successfully and TCL_ERROR if the interpreter could not be registered (e.g. because name is already in use). In the event of an error, interp->result is modified to point to a message describing the error.
This procedure also adds a send command to interp, so that commands may be sent from interp to other interpreters.
The registration persists until the interpreter is deleted or the send command is deleted from interp, at which point interp is automatically unregistered.
Tk_RegisterInterp is called automatically by Tk_CreateMainWindow, so applications don't normally need to call it explicitly.