[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_TclEval

Overview

Execute a Tcl script

Syntax

    int Ns_TclEval (
    Ns_DString *pds,
    char *hServer
    char *script
    );

Description

The Ns_TclEval function executes the Tcl function specified by script on the server specified by hServer. It writes the results to the passed-in pds variable.

Note that the string in script may be temporarily modified by Tcl, so it must be writable. For example, use:

    char script[*]="sometcl";

instead of:

    char *script="sometcl";

Examples

Use this code to call ns_sendmail from C:

    NS_DStringVarAppend(&dsScript, "ns_sendmail", to, " ",
      from, " ", subject, " ", body);
    status=Ns_TclEval(&dsResult, Ns_ConnServer(conn), 
      dsScript.string)

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.