Midas.dll error loading midas.dll

泪湿孤枕 提交于 2019-12-18 08:24:54

问题


I have a problem when I try my app on an other computer without Delphi.

If I put midas.dll in the same folder / directory on System32 I always get error message Error loading midas.dll, but if I put midas.dll on the desktop then the error message does not appear and the application runs normally.

How to handle midas.dll so I can place it in the same folder?


回答1:


From the command line type:

regsvr32 filepath\midas.dll

You should specify a full path (if another copy of midas.dll exists in the system search path, regsvr32 may choose that copy instead of the one in the current directory).

The first time midas.dll is loaded on a machine, it writes a registry entry where it is located.  After that, it always looks to that original location when it is needed.




回答2:


Why Are You Here?

You made some changes in past few days, no, nothing special, and then you released your executable like always. All of a sudden someone informed you that the application no longer runs on their machine, but it displays an error message saying "Error Loading MIDAS.DLL"! So you googled it and you are here. (If this is not the case you can skip my answer)

What Has Happened?

Well, you have used one of TCustomClientDataSet descendants, probably TClientDataSet, and it needs Midas.DLL.

How can you fix this?

You have two options:

  1. Deploy Midas.DLL with your application.

    • Pros: Your executable remains smaller.

    • Cons: You need to get prepared for a war against a brutal army consisting of OS, anti viruses, installer makers, ..., and the midas itself (read OP's question again for an example!).

  2. Add the MidasLib unit to your project's uses clause.

    • Pros: if (not FMuslim) or (not IsRamadan) then you can get some coffee and enjoy it.
    • Cons: Your executable gets bigger (113,664 against 1,124,352 bytes for a just created console application in Delphi2010).

PM: You're right, this is not the right answer to OP's question. Yes, RRUZ has a comment up there, and yes, there's an older question with an accepted answer. But time has passed and Google still insists on this page. I'm pretty sure that such answer could help a noticeable portion of those 24k people who have visited this page during past 4 years.



来源:https://stackoverflow.com/questions/25877533/midas-dll-error-loading-midas-dll

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