title: c# DLLImport calling c++ method with char* as parameter
body: <p>I got an external DLL (c++) with the follwing method:</p>
  
  <pre><code> void _stdcall Set_Config(char* config)
  </code></pre>
  
  <p>I use the following c# code to call the method:</p>
  
  <pre><code>[DllImport(DllName,CharSet=CharSet.Auto)]
      public static extern void Set_Config(String config);
  </code></pre>
  
  <p>But when i execute my c# code i get either an acces violation exception or an System.Runtime.InteropServices.SEHException.
  (My dll is 32 bit, and my c# compiler compiles to 32 bit)</p>
  
  <p>I also tried to replace String config with Stringbuilder, but the same result.</p>
  
  <p>Can someone help me with this problem or give some example code how i have to call the c++ method?</p>