can u terminate the dos window?
-
lets run a dos window (command.com) then type "sort" (then press return key). the dos window blocks there (until we input complete command for "sort"). at this stage, can we terminate the "sort" command or exit dos window without pressing close button of the dos window? - i mean, terminate the dos window only by tying some command ot text? ================================================ this is a VC question actually. I use an app to CreateProcess of the command.com. but once the dos blocks there (i.e. in the middle of sending command "sort"), my app can not terminate the dos window - i have tried all functions (such as TerminateProcess, RxitProcess). i think if i can terminate the dos by command as described above, i can terminate the dos in my app also. thx includeh10
-
lets run a dos window (command.com) then type "sort" (then press return key). the dos window blocks there (until we input complete command for "sort"). at this stage, can we terminate the "sort" command or exit dos window without pressing close button of the dos window? - i mean, terminate the dos window only by tying some command ot text? ================================================ this is a VC question actually. I use an app to CreateProcess of the command.com. but once the dos blocks there (i.e. in the middle of sending command "sort"), my app can not terminate the dos window - i have tried all functions (such as TerminateProcess, RxitProcess). i think if i can terminate the dos by command as described above, i can terminate the dos in my app also. thx includeh10
when u use createprocess to run command.exe are u using the process handle in the return PROCESS_INFORMATION structure to TerminateProcess() ? also sort.exe is another app which is spawned by command.exe, so TerminateProcess() doesnt hav the process handle of sort.exe it only has command.exe. maybe try using createprocess to run sort.exe instead?