Hi, I'm calling zlib.dll to compress/uncompress file in my C# program.
The problem is it works very well on my 32-bit machine, but on another
64-bit machine, it throw an exception says "An attempt was made to load
a program with an incorrect format. <Exception from HRESULT:
0x8007000B>"
when uncompress() is called.
Since I have the source code of Zlib, I can build and generate both
.lib and .dll files. The generated .lib file works well in my C++
program on the 64-bit machine. But the generated .dll just keep
throwing exceptions in my C# program on the same machine.
Did I miss something? I'm really appreciate your help!
Bela Istok - 21 Nov 2006 03:19 GMT
Compile your C# program to use 32 bits, you do this in, the IDE, click in
the arrow that says Any CPU->Configuration Manager: Active Solution
Platform-> <New...>
Regards,
Bela Istok
> Hi, I'm calling zlib.dll to compress/uncompress file in my C# program.
> The problem is it works very well on my 32-bit machine, but on another
[quoted text clipped - 9 lines]
>
> Did I miss something? I'm really appreciate your help!
erxuan - 21 Nov 2006 05:06 GMT
Problem solved! Thank you!
I guess I have to use zlib in my case since I need to parse some files
as input which were compressed using zlib by others.
> Compile your C# program to use 32 bits, you do this in, the IDE, click in
> the arrow that says Any CPU->Configuration Manager: Active Solution
> Platform-> <New...>
>
> Regards,
Bela Istok - 21 Nov 2006 05:29 GMT
As far as I know, zlib uses the Gzip standard, you can use any library that
handle that standard, give a try ;)
Regards,
Bela Istok
> Problem solved! Thank you!
>
[quoted text clipped - 6 lines]
>>
>> Regards,
Bela Istok - 21 Nov 2006 03:28 GMT
Other Question why you use zlib, if the .net framework 2.0 includes a method
to use the gzip format?
See the namespace System.IO.Compression.
Regards,
Bela Istok
> Hi, I'm calling zlib.dll to compress/uncompress file in my C# program.
> The problem is it works very well on my 32-bit machine, but on another
[quoted text clipped - 9 lines]
>
> Did I miss something? I'm really appreciate your help!