title: Calling C++ dll from winforms application
body: <p>I undrstood the process of getting a c++ dll called in a c# console application. Can you please help me in getting the c++ dll called, in one of the button functions of a Form application that I have created in c# again.</p>
  
  <pre><code>namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void button3_Click(object sender, EventArgs e)
          {
              // call the c++ dll here.
          }
       }
  }
  </code></pre>
  
  <p>I want the dll to be called in the function call "button3_Click".   I tried doing the </p>
  
  <pre><code>[DllImport("LicenseCheck.dll")];
  public static extern void GetLicense();
  </code></pre>
  
  <p>call that stackoverflow taught me,  but then that worked only when I tried it on a console application.</p>
  
  <p>Would certainly be happy if someone could help me. Thanks</p>