Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-17-2008
sylvain sylvain is offline
Registered User
 
Name: Sylvain Fasel
Organization: university of Geneva
Project: quantum cryptographic systems
 
Join Date: Feb 2003
Location: Geneva (Switzerland)
Posts: 42
bzip2.dll

Hi,

I am developing with Ice for .Net using c# with Visual Studio 2005.

Everything works well, except for the fact that each time the Ice.dll is loaded I can see an exception thrown (note that this exception is internally caught, so there is no particular problem for running my program).

This exception say that:
'myprog' (Managed): Loaded 'C:\myprog\bin\x86\Debug\Ice.dll', Symbols loaded.
A first chance exception of type 'System.DllNotFoundException' occurred in Ice.dll

Additional information: Unable to load DLL 'bzip2.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

So it is about bzip2.dll. This dll is not a c# assembly but a c++ one it seems, so I cannot simply add it as a reference in my project.

My question is: how can I ensure that bzip2.dll is found (and thus that compression features are enabled)?

Thanks a lot in advance.
__________________
Sylvain Fasel
Group of Applied Physics
University of Geneva
www.gapoptic.unige.ch
Research in applied quantum cryptography
Reply With Quote
  #2 (permalink)  
Old 10-17-2008
dwayne's Avatar
dwayne dwayne is offline
ZeroC Staff
 
Name: Dwayne Boone
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Jan 2005
Location: St. John's, Newfoundland
Posts: 363
You need to make sure that the location of the bzip2.dll is in your PATH environment setting when you run your application.
Reply With Quote
  #3 (permalink)  
Old 10-20-2008
sylvain sylvain is offline
Registered User
 
Name: Sylvain Fasel
Organization: university of Geneva
Project: quantum cryptographic systems
 
Join Date: Feb 2003
Location: Geneva (Switzerland)
Posts: 42
Hi Dwayne,

Thanks for your reply.

What you proposed is not very convenient when deploying an application, I think you'll agree.

Ice.dll seems to search first for bzip2.dll being in the same folder, so I am looking for a way to instruct VS2005 to copy this dll into the build folder.

It would be nice if bzip2.dll could be embedded in Ice.dll, so that we could deal with a single assembly.

Regards.
__________________
Sylvain Fasel
Group of Applied Physics
University of Geneva
www.gapoptic.unige.ch
Research in applied quantum cryptography
Reply With Quote
  #4 (permalink)  
Old 10-20-2008
sylvain sylvain is offline
Registered User
 
Name: Sylvain Fasel
Organization: university of Geneva
Project: quantum cryptographic systems
 
Join Date: Feb 2003
Location: Geneva (Switzerland)
Posts: 42
Well, adding bzip2.dll to the right project and setting its properties to "copy if newer" does the trick, but I would prefer a cleaner solution.

Thanks
__________________
Sylvain Fasel
Group of Applied Physics
University of Geneva
www.gapoptic.unige.ch
Research in applied quantum cryptography
Reply With Quote
  #5 (permalink)  
Old 10-20-2008
michi's Avatar
michi michi is offline
Registered User
 
Name: Michi Henning
Organization: Triodia Technologies
Project: I have a passing interest in Ice :-)
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 1,055
This really has little to do with Ice, and more to do with how Windows locates DLLs. Basically, for protocol compression to work, the Ice run time requires bzip2.dll. But that DLL may not be present on all machines. So, the run time tries to load the DLL dynamically and, if that fails, simply disables protocol compression.

Unless you actually need protocol compression, no harm is done. If you do need it, simply put bzip2.dll into the system or windows directory, where it will be found.

See Dynamic-Link Library Search Order (Windows) for more information.

Cheers,

Michi.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any benchmarks on using bzip2 compression? wobster Comments 4 09-19-2004 09:13 AM


All times are GMT -4. The time now is 04:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2009 ZeroC, Inc.