• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:


In the Delphi help files, it states that if you use sharemem, then you should deploy borlandmm.dll, but I can't find it anywhere.  I appear to be having problems on certain machines with DLL's that I've written and they are using sharemem, problems are gpfing on registration and upon unloading of the DLL.  Anyone had any dealings with sharemem and delphi written dll's ?
1 Solution
Isn't it "Borlndmm.dll"?
ON my system it is in ..\Delphi 3\Bin
Dazza051197Author Commented:
Quote from the del4op.hlp file :
ShareMem is the interface unit for the BORLANDMM.DLL memory manager, which allows modules to share dynamically allocated memory. BORLANDMM.DLL must be deployed with applications and DLLs that use ShareMem. When an application or DLL uses ShareMem, its memory manager is replaced by the memory manager in BORLANDMM.DLL.

BUT, you are right, it is borlndmm.dll and once I'd distributed it, everything is fine.  Many thanks.

BTW. Answer this comment and I'll grade you for the points.

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Oh I missed out that in my help file it says DELPHIMM.DLL
Dazza051197Author Commented:
oh, I have both borlndmm.dll and delphimm.dll, which do I need to deploy ?

IF your application is written in:

Delphi 4 or 5, BCB 4:
Deploy Delphimm.DLL

Delphi 2 or 3,  BCB 1 or 3:
Deploy Bolndmm.dll

You'll find both in Delphi's or C++ Builder's \Bin folder.


I think you need to deploy borlndmm.dll if you are using D4 otherwise if D3 then delphimm.dll.
straight from a new dll:
{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }
therefore you need to deploy BORLNDMM.DLL  which is in the delphi\bin directory

Regards Barry
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now