Dear Purrer,
Many thanks for your post. It saved my day.
Purrer Wolfgang wrote:
Re: 0x80040154 - Exception, Interop and 64bit OS.
25-Sep-07
I found an answer:
At first i switched the target plattform form the one assembly to x86,
than this error popped up.
Unhandled Exception: System.BadImageFormatException: Could not load
file or asse
mbly 'LagComosLib, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null' or one
of its dependencies. An attempt was made to load a program with an
incorrect fo
rmat.
File name: 'LagComosLib, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null'
at Strasse7.Strasse7.Main(String[] args)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM
\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software
\Microsoft\Fus
ion!EnableLog].
After this I switched all the assemblies and exe in my project to x86
and it worked!
Just to write it down helped to solve the problem by myself => thanks
folks!
Previous Posts In This Thread:
On Tuesday, September 25, 2007 10:45 AM
ng.w.purre wrote:
0x80040154 - Exception, Interop and 64bit OS.
I have two server
Server A) Production Server with Windows 2k3 64Bit + Comos
Server B) Development Server with Windows 2k3 32 Bit + Visual Studio
2005 + Comos
Comos is the software where the dll is from.
With the command on Server A)
TlbImp "C:\Program Files (x86)\Comos\ocx\comos.dll" /out:Plt.dll i
created a Interop - Assembly
On the Server B) I developed and tested the application with the comos
- Application and the interop worked fine
Now I went back to Server A but here this excepetion was raised:
Retrieving the COM class factory for component with CLSID {3BDD1BA3-
E09C-11CF-9BB7-00A0248A9BEE} failed due to the following error:
80040154. System.Runtime.InteropServices.COMException (0x80040154):
Retrieving the COM class factory for component with CLSID {3BDD1BA3-
E09C-11CF-9BB7-00A0248A9BEE} failed due to the following error:
80040154.
at LagComosLib.Comos.Init()
Is there a possibility for the Interop - Assembly to use only the name
not the guid, and still use an interop assembly?
On Tuesday, September 25, 2007 11:08 AM
ng.w.purre wrote:
I found out, on my the server b) the clsid is in
I found out, on my the server b) the clsid is in HKEY_CLASSES_ROOT
\wow6432Node\CLSID
and no server a) the clsid is in HKEY_CLASSES_ROOT\CLSID
=> Because I had some troubles with my caspol I know that my dotnet
applikation uses the 64 - Bit - Framework
=> Could it that it tries to use the dll as a 64bit and not as a 32
Bit ?
=> How could i prevent this?
=> How can I start an applications as an 32bit - Version
On Tuesday, September 25, 2007 11:23 AM
Purrer Wolfgang wrote:
Re: 0x80040154 - Exception, Interop and 64bit OS.
I found an answer:
At first i switched the target plattform form the one assembly to x86,
than this error popped up.
Unhandled Exception: System.BadImageFormatException: Could not load
file or asse
mbly 'LagComosLib, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null' or one
of its dependencies. An attempt was made to load a program with an
incorrect fo
rmat.
File name: 'LagComosLib, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null'
at Strasse7.Strasse7.Main(String[] args)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM
\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software
\Microsoft\Fus
ion!EnableLog].
After this I switched all the assemblies and exe in my project to x86
and it worked!
Just to write it down helped to solve the problem by myself => thanks
folks!
On Saturday, December 12, 2009 11:18 AM
Adam Armstrong wrote:
0x80040154 - Exception, Interop and 64bit OS.
Dear Purrer Wolfgang ,
Many thanks for your post. I has certainly helped me today!
Adam
Submitted via EggHeadCafe - Software Developer Portal of Choice
.NET 2.0 Generics - Load A Business Class In A Clueless Database Layer
http://www.eggheadcafe.com/tutorials/aspnet/2187d05c-7d8a-4f6e-9f24-9f4ac5bd8679/net-20-generics--load.aspx