On Tue, 15 May 2001, Tam Huynh wrote:
> I haven't found anything on tclblend loading dynamic library such as dll's
> that are c tcl extensions. I thought about using tcl.lang.Extension but
> doesn't loadOnDemand expect a classname?
>
> String myfile = "d:/Tcl83/bin/hello.tcl";
> Interp newInterp = new Interp();
> Extension.loadOnDemand(newInterp, "example", "d:/tcl83/lib/example.dll");
> newInterp.evalFile(myfile);
> newInterp.dispose();
Tcl Blend is a C Tcl extension. You can load it into Tcl along
with other C extensions. This is done with the Tcl load command.
The Tcl/Java API deals with Java classes not native Tcl extensions,
if you want to make Tcl load a .dll then call:
interp.eval("load " + dllname);
Mo DeJong
Red Hat Inc
|