Hm, in thinBasic history I found for version 1.0.9.1 mention of a Windows API call:
http://msdn.microsoft.com/en-us/libr...52(VS.85).aspx - Attaches the calling process to the console of the specified process.
Also FreeConsole and AllocConsole are mentioned in MSDN so I guess that's it.
Would be interested in some working example - I guess the parameter is some parent process ID,
but where do I get such process ID and what is the purpose of attaching?
I ask because I'm working on some kind of "extended" cmdline or Dos box, which will have some additional commands (prefixed with ! for example).
The problem is if you type CD C:\something and in the next line want to delete some file in that folder the environment is not preserved - for each
execution I call something like:
OS_Shell($cmdline, %OS_WNDSTYLE_NORMAL, %OS_SHELL_SYNC)
And my idea is to use this console_attach to somehow preserve the enviroment.
Or does anyone have a better idea how to solve this env problem?
Bye,
Oli
Bookmarks