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

2019-05-23 05:00发布

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.

Wich file should we put where?

In windows\system32 or windows\syswow64 ?

2条回答
淡お忘
2楼-- · 2019-05-23 05:14

On a 64 bit system:

  • The 64 bit system directory is named System32.
  • The 32 bit system directory is named SysWOW64.

If you must copy a DLL into the system directory, make sure that you copy 32 bit DLLs to the 32 bit system directory, and 64 bit DLLs to the 64 bit system directory. That's essential if you want your application to be able to locate the DLL.

Since your code is 32 bit, you need to use the 32 bit DLL.

However, you should probably place the DLL in the same folder as your executable since the Windows system directory is private and reserved for use by the system. Applications should not modify the system directory.

查看更多
在下西门庆
3楼-- · 2019-05-23 05:22

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.

查看更多
登录 后发表回答