我有一個Visual Basic DLL,我在Windows用戶控制應用程序中使用它。它工作正常,但當我主持這個Windows用戶控制在另一個Windows窗體應用程序,它給我以下錯誤。在.NET 3.5 Windows應用程序中使用VB DLL錯誤
An error occurred creating the form. See Exception.InnerException for details. The error is: Creating an instance of the COM component with CLSID {66DF4F1A-E3E2-43D3-92BC-D56E9DDCB8AC} from the IClassFactory failed due to the following error: 800a005b.
當我運行了用戶控制它正常工作與我,只有當我在另一個Windows應用程序託管它出現此錯誤。
我使用Visual Studio 2008 & Windows Server 2003的
當我添加了用戶控制,該DLL的路徑爲「C:\的Documents and Settings \用戶名\我的文檔\ Visual Studio 2008中\ Projects \ HMS_WF4 \ HMS_WF4 \ obj \ Release \ Interop.DLLNAME.dll「
注意事項:它在Release中,但是當我編譯應用程序時,它將輸出放在Debug
文件夾中。即使我選擇Release
文件夾進行調試和編譯,運行應用程序時,它也會在Release
文件夾中搜索DLL,但它位於Debug
文件夾中。
當我在WINDOWS USER CONTROL中添加VB6程序集時,它的名稱前面是「Interop」,然後是 「NAME.DLL」,但是當我將它添加到託管USER CONTROL的Windows應用程序時,它的名稱仍然是「NAME」。 DLL」 – MuniR 2011-03-26 08:10:55