2012-08-03 38 views
2

我有一些使用C++編寫的COM .dll文件,我通過regsvr32註冊過。有問題的機器是32位機器,而.dlls本身也都是32位機器。COMException:80040154

在C#Visual Studio中,我添加了對COM應用程序的引用,並嘗試創建一個定義的coclasses。但是,當我嘗試運行時,出現以下錯誤消息。

Creating an instance of the COM component with CLSID {125F6114-3444-41B0-A5CC-7333EAA8020A} from the IClassFactory failed due to the following error: 80040154. 

我在註冊表中查找CLSID,並在所有正確的位置找到它。如果甚至Visual Studio可以找到它,我怎麼能創建COM組件?

+0

你有沒有嘗試做什麼http://stackoverflow.com/questions/1036856/retrieving-the-com-class-factory-for-component-with-clsid-xxxx-failed-due-to-t說?這裏有一個截圖鏈接http://softwaredevelopmentforecm.wordpress.com/2009/12/16/failed-due-to-the-follow-error-80040154/ – banging 2012-08-03 18:28:08

+0

使用SysInternals的ProcMon來查看你的應用在註冊表中的位置。 – 2012-08-03 19:21:03

回答

0

我有同樣的問題,沒有任何工作,直到我試圖以管理員身份運行Visual Studio。