D
Dv
When our application is launched from Dos console, we need to print
some message to the console. I attached our application to the console
using AttachConsole(ATTACH_PARENT_PROCESS), and then call
Console.WriteLine(...) to print some messages there. Everything works
fine, except that after the message has been printed, it'll require
user to press any key exit from there.
So, I'd like to insert a key stroke to the StandardInput
programmtically. I know some kernel32.dll APIs can do that. But I
wonder if there're any equivalent C# functions?
some message to the console. I attached our application to the console
using AttachConsole(ATTACH_PARENT_PROCESS), and then call
Console.WriteLine(...) to print some messages there. Everything works
fine, except that after the message has been printed, it'll require
user to press any key exit from there.
So, I'd like to insert a key stroke to the StandardInput
programmtically. I know some kernel32.dll APIs can do that. But I
wonder if there're any equivalent C# functions?