I am using FFmpeg in application and it start and record video perfectly but when I want to stop it ask for press "q", I got a System.EntryPointNotFoundException Error message.
How can I send message "q" to process which is in running state from application
int key_q = 81;
[DllImport("user32.dll", EntryPoint = "postmessage")]
private static extern bool postmessage(IntPtr hwnd, uint msg, int wparam, int lparam);
private void button_stop_Click(object sender, EventArgs e)
{
string process = "ffmpeg";
Process[] pro = Process.GetProcessesByName("ffmpeg");
pro[0].Refresh();
IntPtr h = pro[0].MainWindowHandle;
postmessage(h, 0x100, key_q, 0);
}