-1
我在Visual Studio 2008下的VB.net中編寫代碼。我有這個錯誤,我不明白爲什麼。檢索具有CLSID {XXXX}的組件的COM類工廠失敗,原因如下:80040154 VB.net
Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154
我使用的DLL,我想在64位編譯它。我有以下代碼:
Imports MetroProDAT_Library
Public Class Data
Public attr As ZygoDataAttributes
Public oData As ZygoDataFile
Public Sub LoadData(ByVal FileName As String)
Dim idx As Double
Dim jdx As Double
oData = New ZygoDataFile '///this sentence bug
attr = oData.Attribute
End Sub
End Class
COM DLL幾乎可以肯定是一個32位的DLL。如果你的應用程序必須保持64位,你將不得不跳過一些環節讓他們一起工作。看到這個:http://www.scribd.com/doc/56629579/64-Bit-Insider-Volume-1-Isue-7 – Plutonix
看到這個SO回答 [如何修復COM異常錯誤80040154](http:// stackoverflow.com/questions/7197506/how-to-repair-comexception-error-80040154) –
好吧,我會嘗試。我認爲問題是我的圖書館,因爲在32 bi中它運作良好。我想改變我的DLL,但是我的dll在Visual Studio中的路徑是\ Home \ Desktop \ P4 \ WindowsApplication3 \ obj \ x64 \ Debug \ Interop.MetroProDAT_Library.dll? Visual Studio在文件夾中創建了一個副本? – user3033519