Search code examples
delphi32bit-64bitdatasnapdelphi-xe4

Which midas.dll to use? 32bit datasnap/64bit server


Considering the following: We have a 32 bit Datasnap server installed on a 64 BIT Windows Server

In embarcadero\rad studio\11.00\redist are 2 folders : 32 bit and 64 bit, with in each a midas.dll.

Which file should we put where?

In windows\system32 or windows\syswow64?


Solution

  • Never put anything in the Windows system directories (unless you have a very, very, very good reason to write there).

    It's a very bad practice (dating back to Windows 3.x times and poor developers skills, because those dirs are always in the search path) just leading to troubles (i.e. if another application chnages your DLL with its own with little or no checks). Put the DLL in the application folder. It will ensure your application uses the correct version of the DLL. Or if you have to write it elsewhere for a very, very, very good reason use one of the techniques to add a directory to the search path or redirect DLL loading.

    Windows system directories must be regarded as operating system private ones. This kind of practices which Windows doesn't forbids enough are those that often makes Windows a slow and unstable system.

    If you're application is 32 bit, you need the 32 bit DLL regarless of the operating system.