Caveat when using OSCall>>#allocConsole

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Caveat when using OSCall>>#allocConsole

Richard Sargent
Administrator
If you use OSCall new allocConsole to open a console, be aware of some of the consequences of doing so. If one closes the console window via its system menu or the close button (X in upper-right corner), it will shutdown your entire VA process without giving your application any control over it.


Instantiations' "lead vm guy" explains:
"We cannot control the console created by WinAPI call. 
The MS docs don't mention it explicitly, but they state that AllocConsole *attaches* the process *to* a new console - not the console to the process.
Thus, console has master role, and closing the console closes the process. To get rid of the console FreeConsole WinAPI call should be used."


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/5b8bb0ea-3c40-4508-94a7-0cc091f019d6%40googlegroups.com.