Home  >  Q&A  >  body text

windows C++ 如何向另一个进程发送信号?(包括所有SIGXXX信号)

请问 Windows 下的 C++ 如何像 linux 那样调用 kill() 函数向另一个进程发送SIGXXX信号?

巴扎黑巴扎黑2765 days ago741

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-17 15:07:09

    If the other party has a window, you can use SendMessage or PostMessage
    If there is no window, you can use the kernel synchronization variable Event. The receiver uses WaitForSingleObject to wait, and the sender uses SetEvent to believe

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 15:07:09

    Call the API function SendMessage or PostMessage

    reply
    0
  • Cancelreply