title: Delphi DLL that is compatible with other programming languages
body: <p>I want to build a DLL that exports functions that return a string. This DLL should work with other programming languages!! 
  I have found all kind of nasty solutions/hacks to this, best one is to make my function return Pchar then call another function contained in the same DLL ( let's call it ReleaseMemory) to release the memory reserved for PChar.</p>
  
  <p>Anyway, recently I have discovered FastShareMem library. It says it can do exactly what I want WITHOUT calling the ReleaseMemory. On the other side FastMM seems to do the same AS LONG as both the DLL and the application uses FastMM as memory manager. This instantly kill the chance of using FastMM as memory manger for my universal DLL. Right?</p>
  
  <p>====================</p>
  
  <p>FastShareMem (<a href="http://www.codexterity.com/fastsharemem.htm" rel="nofollow noreferrer">http://www.codexterity.com/fastsharemem.htm</a>), Delphi 7, Windows XP 32 bits, Windows 7 64 bits</p>