All relevant information can be found in the documentation about the function.
The function returns the number of events that it successfully
inserted into the keyboard or mouse input stream. If the function
returns zero, the input was already blocked by another thread.
So how it works is that it inserts the events in the INPUT structures (which are fed to the function through the parameters) serially into the keyboard or mouse input stream and then returns the number of those events that are successfully inserted..
7
solved How does sendInput() function work in C#? [closed]