Home Help Center

bzip2.dll

sylvainsylvain Member Sylvain FaselOrganization: university of GenevaProject: quantum cryptographic systems ✭✭
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.

Comments

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    You need to make sure that the location of the bzip2.dll is in your PATH environment setting when you run your application.
  • sylvainsylvain Member Sylvain FaselOrganization: university of GenevaProject: quantum cryptographic systems ✭✭
    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.
  • sylvainsylvain Member Sylvain FaselOrganization: university of GenevaProject: quantum cryptographic systems ✭✭
    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
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    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.
  • PerfPerf Member Alex PupkinOrganization: PersonalProject: smart home system
    In Ice-3.5.1 im found 6 version of bzip2.dll
    Version from Ice-3.5.1\bin\x64 work fine on W7-64-Prof, W7-64-Corp but not work in W7-64-Home !

    In Win7-64-Home work only bzip2.dll from Ice-3.5.1\bin !

    why ?!

    My client written С#, configured as "AnyCPU", other ice dll from Ice-3.5.1\Assemblies and Ice-3.5.1\bin\x64
Sign In or Register to comment.