一位同事和我正在讨论,我们都不确定这是如何工作的。 假设您创建了一个使用Bar.DLL函数Foo()的程序。
如果缺少Bar.DLL,是否仍然可以启动程序,它只会在尝试调用Foo()时崩溃,或者程序是否会无法启动?
A coworker and I were having a discussion and neither of us is actually sure of how this would work. Let's say that you create a program that uses function Foo() from Bar.DLL.
If Bar.DLL is missing, will it still be possible to launch the program and it will just crash when attempting to call Foo() or will the program simply fail to launch?
最满意答案
在dll丢失时运行应用程序的唯一方法是,当该dll动态加载时,应用程序运行并且(可能)显示错误信息,但不会崩溃
如果该dll是静态加载的,则应用程序永远不会运行,OS会显示标准错误消息
The only way to run a app when a dll is missing, is when that dll is DYNAMICALLY LOADED, the app runs and (maybe) shows a error msg, but dont crash
if that dll is statically loaded, the app never runs and OS shows you a standard error msg
更多推荐
发布评论