none
Is SendInput() API safe to use? RRS feed

  • Question

  • I have an application , which need to send "Enter" key to its own console.I heard that sendInput will be blocked by windows and some antivirus as they see virtual keystrokes as a threat.Is this true ?
    Friday, September 6, 2019 6:58 AM

Answers

All replies

  • SendInput in only blocked by tools like GameGuard
    Friday, September 6, 2019 7:03 AM
  • SendInput is subject to Windows built-in UIPI (User Interface Privilige Isolation) protections.  The docs for SendInput say "This function is subject to UIPI. Applications are permitted to inject input only into applications that are at an equal or lesser integrity level."

    Friday, September 6, 2019 8:45 AM
  • Hello,

    Thank you for posting here.

    >>I heard that sendInput will be blocked by windows and some antivirus as they see virtual keystrokes as a threat.Is this true ?

    What you say is individual case, some Anti-virus software may see it as a threat. But in most cases, this can be used safely. 

    Refer to the link below for a detailed description of SendInput().

    https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput

    Best Regards,

    Suarez Zhou


    Friday, September 6, 2019 9:43 AM