Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
erxuan - 21 Nov 2006 02:04 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.