title: Exporting function names from C++ Dll to Delphi
body: <p>I have a working DLL written in C++ with Visual Studio 2015. It contains many functions of the form:</p>
  
  <pre><code>BECALIBRARY_API  int Functions::GetVersion(char* ptrVersionString)
  {
      char * Version;
      Version = "Test 123456";
      strcpy_s(ptrVersionString, strlen(Version) + 1, Version);
      return  strlen(Version);
  }
  </code></pre>
  
  <p>The Delphi function to retrieve this is:</p>
  
  <pre><code>unit uBecaLibrary;
  
  interface
  
  function getVersion(Str1: pAnsichar): integer; stdCall;
  
  implementation
  
  function getVersion; external 'BecaLibrary.dll' index 1;
  //function getVersion; external 'BecaLibrary.dll' name 'getVersion';
  
  end.
  </code></pre>
  
  <p>This works fine except that I have to maintain the Delphi code using the index numbers of the DLL.</p>
  
  <p>What do I need to do to both the C++ side and the Delphi Seattle Windows 10 side to use function names rather than indexes.</p>