Error shutting down TCL



Hi,

I'm having some trouble shutting down TCL embedded in a DLL (on
WinXP). The function below blows up on the second printf. For some
reason after calling Tcl_Finalize, I always get the error "Library
function error(return value == -1 {0xffffffff}). Bad File Handle

If I comment out the printf... I still get the same error on the very
next printf I encounter

int __stdcall ShutDown(void) {

int ret;

ret = printf ("Deleting instance of TCL Interpreter\n");
Tcl_DeleteInterp(myInterpreter);
Tcl_Finalize();

ret = printf("Unloading TCL Library: %#X\n", hTCLModule);
FreeLibrary(hTCLModule);
return 0;
}



Jon

.



Relevant Pages

  • Re: Redirecting Default Output to a Socket
    ... >> For some reason, this doesn't work. ... I did setlinebufbefore calling printf(). ... ssflush() is no longer needed. ...
    (comp.unix.programmer)
  • Re: Error shutting down TCL
    ... WinXP). ... The function below blows up on the second printf. ... One of the things Tcl_Finalize does is closing open channels ...
    (comp.lang.tcl)
  • Re: Question about void pointers
    ... never found a reason to use it with scanf. ... I suppose (although printf() and scanf() are by no means mirror ... itself in a single string, we avoid any problems with funny formats. ...
    (comp.lang.c)
  • Re: On the interchangeability of (void *) and (char *) to printf()
    ... that void* and char* be passed to printf the same way. ... va_argmacro and provides a normative statement for the interchangeability ... I reach the same conclusion but for a different reason. ...
    (comp.lang.c)
  • Re: address of a statement in C
    ... However, there ren't many alternatives to printf, while there are ... many alternatives to goto. ... So there's a good reason to use a looping construct, ... The extra output could ...
    (comp.lang.c)