title: How to Create DLL in C# and call in Delphi XE6
body: <p>I created a DLL in VS2013 using File/New Project/Class Library. I then tried to load it dynamically in Delphi. But Delphiis returning <code>NIL</code> for procedure <code>GetProcAddress</code>.</p>
  
  <p>My C# &amp; Delphi code looks like what I have posted below. In the code <code>GetProcAddress</code> is returning <code>NIL</code>. Please advise if I am missing something.</p>
  
  <p><strong>C# Code</strong></p>
  
  <pre><code>using System;
  namespace TestDLL
  {
      public class Class1
      {
          public static string EchoString(string eString)
          {
              return eString;
          }
      }
  }
  </code></pre>
  
  <p><strong>Delphi Code</strong></p>
  
  <pre><code> Type
      TEchoString = function (eString:string) : integer;stdcall;
  
    function TForm1.EchoString(eString:string):integer;
    begin
      dllHandle := LoadLibrary('TestDLL.dll') ;
      if dllHandle &lt;&gt; 0 then
      begin
        @EchoString := GetProcAddress(dllHandle, 'EchoString') ;
        if Assigned (EchoString) then
              EchoString(eString)  //call the function
        else
          result := 0;
        FreeLibrary(dllHandle) ;
      end
      else
      begin
        ShowMessage('dll not found ') ;
     end;
  end;
  </code></pre>