I am trying to send keys such as F4 F1 F2 or Enter to child process without type in keyboard.
I'm trying to use PostThreadMessageW But it not work.
PostThreadMessageW(pi.dwThreadId, (UINT)WM_KEYDOWN, VK_NUMPAD0, 1);
PostThreadMessageW(pi.dwThreadId, (UINT)WM_KEYDOWN, VK_RETURN, 1);
my child process run console app that just wait some input then close
printf("Child Process");
getch();
Before i post message this process isn't close.
Have anyway to send keypress to Child process.
Or I'm doing something wrong?
Aucun commentaire:
Enregistrer un commentaire