[zeromq-dev] BadImageFormatException

Michael Compton michael.compton at littleedge.co.uk
Sun Feb 6 20:57:09 CET 2011


Hi Torsten,

This is usually a mismatch between target arch of the ZeroMQ lib and the
CLR binding e.g. 64bit ZeroMQ lib and 32bit CLR build.

Which CLR binding are you trying?

Cheers,
Michael

On Sun, 2011-02-06 at 19:59 +0100, Torsten Langner wrote:
> Hi,
> 
>  
> 
> I tried to use C# with 0MQ but the first try just ends up in a
> BadImageFormatException. I compiled against “AnyCPU”…
> 
>  
> 
> Any ideas welcome!
> 
>  
> 
> -Torsten
> 
>  
> 
>  
> 
>  
> 
> C:\ZeroMQTest\bin\x64\Release>dir
> 
> Volume in drive C has no label.
> 
> Volume Serial Number is 1031-2F6A
> 
>  
> 
> Directory of C:\ ZeroMQTest\bin\x64\Release
> 
>  
> 
> 06.02.2011  19:43    <DIR>          .
> 
> 06.02.2011  19:43    <DIR>          ..
> 
> 06.02.2011  19:38            16.384 clrzmq.dll
> 
> 06.02.2011  19:38            42.496 clrzmq.pdb
> 
> 06.02.2011  16:38           609.280 libzmq.dll
> 
> 06.02.2011  19:43             5.120 ZeroMQTest.exe
> 
> 06.02.2011  19:39               144 ZeroMQTest.exe.config
> 
> 06.02.2011  19:43            11.776 ZeroMQTest.pdb
> 
> 06.02.2011  19:44            11.592 ZeroMQTest.vshost.exe
> 
> 06.02.2011  19:39               144 ZeroMQTest.vshost.exe.config
> 
> 17.03.2010  21:39               490 ZeroMQTest.vshost.exe.manifest
> 
>                9 File(s)        697.426 bytes
> 
>                2 Dir(s)   6.710.173.696 bytes free
> 
>  
> 
> C:\ZeroMQTest\bin\x64\Release>ZeroMQTest.exe
> 
> test #1
> 
>  
> 
> Unhandled Exception: System.BadImageFormatException: An attempt was
> made to load a program with an incorrect format. (Exception from
> HRESULT: 0x8007000B)
> 
>    at ZMQ.C.zmq_init(Int32 io_threads)
> 
>    at ZMQ.Context..ctor(Int32 io_threads) in C:\ zeromq-cs
> \zeromq-clrzmq2-4d90fc5\clrzmq\zmq.cs:line 364
> 
>    at ZeroMQTest.Program.TestClient() in C:\ZeroMQTest\Program.cs:line
> 14
> 
>    at ZeroMQTest.Program.Main(String[] args) in C:\ZeroMQTest
> \Program.cs:line 32
> 
>  
> 
> C:\ZeroMQTest\bin\x64\Release>
> 
>  
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev





More information about the zeromq-dev mailing list