title: Why i'm getting exception Unable to find an entry point when using SendMessage?
body: <p>I'm trying to send some text to the notepad window.</p>
  
  <p>In the top of form1:</p>
  
  <pre><code>const int WM_SETTEXT = 0X000C;
  
  //include FindWindowEx
  [DllImport("user32.dll")]
  public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
  
  //include SendMessage
  [DllImport("user32.dll")]
  public static extern int SendMessages(IntPtr hWnd, int uMsg, int wParam, string lParam);
  </code></pre>
  
  <p>Then in the constructor:</p>
  
  <pre><code>//getting notepad's process | at least one instance of notepad must be running
  Process notepadProccess = Process.GetProcessesByName("notepad")[0];
  
  //getting notepad's textbox handle from the main window's handle
  //the textbox is called 'Edit'
  IntPtr notepadTextbox = FindWindowEx(notepadProccess.MainWindowHandle, IntPtr.Zero, "Edit", null);
  //sending the message to the textbox
  SendMessages(notepadTextbox, WM_SETTEXT, 0, "This is the new Text!!!");
  </code></pre>
  
  <p>The exception is on the line:</p>
  
  <pre><code>SendMessages(notepadTextbox, WM_SETTEXT, 0, "This is the new Text!!!");
  </code></pre>
  
  <p>An unhandled exception of type 'System.EntryPointNotFoundException' occurred in exe</p>
  
  <p>Additional information: Unable to find an entry point named 'SendMessages' in DLL 'user32.dll'.</p>
  
  <p>The full exception message:</p>
  
  <pre><code>System.EntryPointNotFoundException was unhandled
    HResult=-2146233053
    Message=Unable to find an entry point named 'SendMessages' in DLL 'user32.dll'.
    Source=Grads_Scripts
    TypeName=""
    StackTrace:
         at Grads_Scripts.Form1.SendMessages(IntPtr hWnd, Int32 uMsg, Int32 wParam, String lParam)
         at Grads_Scripts.Form1..ctor() in D:\C-Sharp\Form1.cs:line 142
         at Grads_Scripts.Program.Main() in D:\C-Sharp\Program.cs:line 19
         at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
         at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
         at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
    InnerException: 
  </code></pre>