Binarysharp.MemoryManagement.Windows.WindowCore.SendInput C# (CSharp) Method

SendInput() public static method

Synthesizes keystrokes, mouse motions, and button clicks.
public static SendInput ( Input inputs ) : void
inputs Binarysharp.MemoryManagement.Native.Input An array of structures. Each structure represents an event to be inserted into the keyboard or mouse input stream.
return void
        public static void SendInput(Input[] inputs)
        {
            // Check if the array passed in parameter is not empty
            if (inputs != null && inputs.Length != 0)
            {
                if (NativeMethods.SendInput(inputs.Length, inputs, MarshalType<Input>.Size) == 0)
                    throw new Win32Exception("Couldn't send the inputs.");
            }
            else
            {
                throw new ArgumentException("The parameter cannot be null or empty.", "inputs");
            }
        }