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

痞子三分冷 提交于 2019-12-06 14:16:00

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!