From: Jeff H. <je...@Ac...> - 2006-01-17 20:40:17
|
> Now that I read mkstemp(), I remember the problem. This > function will open a temporary file for you. It accepts a > template, so you can have some control over the file location > and naming. But, you can't ever get the file name back from > the open file handle. If I can't get the file name, then I > can't use this sort of temp file for loading shared libraries > copied out of my starkit. You're right ... from the Tcl perspective, getting a tempfile that you can't id by name is useless. Populating is OK: set fd [file mkstemp $template] set dllInKit /path/to/vfs/lib.dll set fdDll [open $dllInKit] chan configure $fd -encoding binary chan configure $fdDll -encoding binary chan copy $fdDll $fd chan close $fd chan close $fdDll but then you can't 'load' it ... Jeff |