title: Passing string as PChar from CSharp to Delphi DLL
body: <p>I'm trying to pass a string from C# to Delphi built DLL.
  Delphi DLL expects PChar.</p>
  
  <p>Here is Delphi export</p>
  
  <pre><code>procedure DLL_Message(Location:PChar;AIntValue :integer);stdcall;
  external 'DLLTest.dll';
  </code></pre>
  
  <p>C# import(last one I tried, there were string, char* ref string ...)</p>
  
  <pre><code>[DllImport(
              "DLLTest.dll", 
              CallingConvention = CallingConvention.StdCall,
              CharSet = CharSet.Ansi,
              EntryPoint = "DLL_Message"
          )]
          public static extern void DLL_Message(IntPtr Location, int AIntValue);
  </code></pre>
  
  <p>I get access violation accessing value in any way.</p>
  
  <p>Is there any solution to pass a string value as PChar in C#?</p>