473,395 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

a .dll works on 32-bit machine but not 64-bit machine

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!

Nov 21 '06 #1
4 8293
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
"erxuan" <er****@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
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!

Nov 21 '06 #2
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
"erxuan" <er****@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
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!

Nov 21 '06 #3
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.

Bela Istok wrote:
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,
Nov 21 '06 #4
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
"erxuan" <er****@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
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.

Bela Istok wrote:
>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,

Nov 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Eduardo Rosa | last post by:
Hi people, Somebody knows where I can get a tutorial, or any help, to make "deny words" in my forum? thanks a lot
18
by: James Radke | last post by:
Hello, We are currently using a user DLL that when working in VB 6.0 has a user defined type as a parameter. Now we are trying to use the same DLL from a vb.net application and are having...
5
by: Ian Rutherford | last post by:
Heya guys, It seems VB .net no longer supports the awesome ability of VB 6 to declare something as a string and specify how long the string would be all in one line: Public myString as String *...
4
by: Michael Fuhr | last post by:
I have a query that works in 7.3.6 but not in 7.4.2 unless I turn off enable_hashjoin. I'm joining a table of network interfaces and a table of networks so I can find additional info about a...
9
by: beni.cherniavsky | last post by:
Python seems to be missing a UCS-32 codec, even in wide builds (not that it the build should matter). Is there some deep reason or should I just contribute a patch? If it's just a bug, should I...
28
by: entfred | last post by:
I have the following line of html: &nbsp;&nbsp1234&nbsp;&nbsp;&nbsp;&nbsp;&nbspabc&nbsp;&nbsp;&nbspyow In Internet Explorer 6.0, the columns look ok using the above html: 1234 abcd ...
3
by: edfialk | last post by:
Hi, all I'm trying to do is load the php_mapscript.so library into php. Here's the php file: Code: dl("php_mapscriot.so") if (extension_loaded("MapScript")) echo "works!"; else echo...
1
by: jamesdylangoldstein | last post by:
So I tried to do my father a favor and convert his advertisements to .flv and place them on his website. With Flash being $600, I found an open-source .flv player and configured it. So today he...
16
by: Ravi | last post by:
main() { float a = 5.375; char *p; int i; p = (char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char)p); } the above code gives the binary representation of a.
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.