title: Calling C++ exe functions from C#
body: <p>I'm trying to monitor a running application written in C++ using a different C# application.</p>
  
  <p>In my C++ code I have defined an API:</p>
  
  <pre><code>_declspec(dllexport) //is this even possible when compiling an .exe?
  int  getSomething();
  </code></pre>
  
  <p>Is there a way to call this function from the C# code?</p>
  
  <p>Will the classic approach work:</p>
  
  <pre><code>[DllImport("myexe.exe", CharSet = CharSet.Auto)]
  public static extern int  getSomething();
  </code></pre>