I just stumbled upon an article on The Delphi Wiki that I wrote years ago:
It’s still mostly valid. There have been some improvements in newer Delphi versions, in particular since Delphi 2006 you no longer need the borlndmm.dll if you want to use ShareMem. (But still: Using ShareMem means that your DLL can only be used by Delphi programs, so don’t do that, if you can avoid it.)
That’s not the only article I wrote for that Wiki. It’s interesting to see how much time I apparently had on my hands back then. Sometimes I wish those “good times” came back.