COM类工厂错误80040154打开时,获取目录对话框对话框、工厂、错误、目录

2023-09-06 19:13:48 作者:浪荡街痞

我知道这个问题的常见原因是与该组件被编译为平台,我已经在过去的问题。然而,这是从一个单一用户的报告,并且发生任何他试图打开任一个对话框选择一个文件或目录的时间。我没有使用任何花哨的成分在这里只是标准之一。在的堆栈跟踪的一个相关的线路有:

I know the usual cause for this issue is related to the platform that a component is compiled to and I have had the problem in the past. However this is a report from a single user and occurs any time he tries to open either a dialog to select a file or directory. I am not using any fancy components here just the standard one. The relevant lines in one of the stack traces are:

检索COM类工厂组件具有CLSID   {DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7}失败由于以下   错误:80040154。在   System.Windows.Forms.OpenFileDialog.CreateVistaDialog()在   System.Windows.Forms.FileDialog.RunDialogVista(IntPtr的hWndOwner)在   System.Windows.Forms.FileDialog.RunDialog(IntPtr的hWndOwner)在   System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window所有者)在   System.Windows.Forms.CommonDialog.ShowDialog()在   ScruffyDuck.AirportDesignEditor.MainForm.getOpenFileInfo(字符串   initialDirectory,字符串过滤器)

Retrieving the COM class factory for component with CLSID {DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7} failed due to the following error: 80040154. at System.Windows.Forms.OpenFileDialog.CreateVistaDialog() at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner) at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner) at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner) at System.Windows.Forms.CommonDialog.ShowDialog() at ScruffyDuck.AirportDesignEditor.MainForm.getOpenFileInfo(String initialDirectory, String filter)

我搜索我的注册表此CLSID,并提出了

I searched my registry for this CLSID and came up with

的%SystemRoot%\ SYSTEM32 \ COMDLG32.DLL

%SystemRoot%\System32\comdlg32.dll

这是没有一个惊喜,我想。我认为,因为有许多其他用户那里谁没有这个问题,那就是必须涉及到用户的设置。我想AP preciate如何劝告他在这种情况下,任何想法。

Which is no a surprise I suppose. I assume, since there are many other users out there who do not have this problem that is must relate to the users setup. I would appreciate any ideas on how to advise him in this case.

感谢

推荐答案

我只是猜测,现在,因为这是没有编程的问题,所以不要-1我,如果我没有帮助,只是给一些想法。 ..:P

I'm just guessing now, since this is no programming question, so don't -1 me if I didn't help, just giving some ideas... :P

这里的问题是,该系统不能使COM对象通过该CLSID指定COM类。发生这种情况的原因是多方面的:

Problem here is that the system can't make COM object out of the COM class specified by that CLSID. This can happen for many reasons:

COMDLG32.DLL 未注册,试图用它注册 REGSVR32 COMDLG32.DLL 系统accont不具有完全控制(许可)在持有的CLSID {DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7} 注册表项。您可以检查通过浏览(或搜索注册表),以该键,右键点击它,并通过选择权限... 为系统帐户完全控制权。 尝试上面的Administrator帐户,以及。 库 COMDLG32.DLL 已损坏。这可能发生,如果间谍软件或其他恶意程序试图钩住自己打开文件或浏览目录对话框,因此已经修改的lib ......在这种情况下,你必须重新安装的lib ...或窗口。要检查是的lib OK,使得它的MD5哈希值,并与工作系统的lib的MD5哈希值进行比较。他们应该是相同的。 Library comdlg32.dll is not registered, try to register it with regsvr32 comdlg32.dll System accont doesn't have full control (permission) over the registry key that holds CLSID {DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7}. You can check that by navigating (or searching registry) to that key, right click on it, and by selecting Permissions... give SYSTEM account full control over it. Try the above for the Administrator account as well. Library comdlg32.dll is corrupted. This can happen if the spyware or some other malicious program tried to hook itself to the Open File or Browse Directory dialogs and so has modified the lib... in that case, you have to reinstall the lib... or windows. To check is the lib ok, make the MD5 hash of it, and compare with the MD5 hash of the lib on a working system. They should be identical.

好了,希望我帮助。 :)

Well, hope I helped. :)