1

we have created a c# application which calls a c++ dll(sdbm.dll). It is working properly in most of the PCs except some PCs. The dll is created using VC++ 2008 and application is done in VC# 2005. Following are the errors occured when the dll functions are called from the C# application.

Error occured in one PC is as follows

=====================================

Unable to load sdbm.dll :This application has failed to start because the application configuration is incorrect.Reinstalling the application may fix this problem (Exception from HRESULT :0x800736B1)

Error occured in 2nd PC

=====================================

Error Signature

Appname:app.exe Appver:1.0.0.0 Modname:msvcr90.dll Modver:9.0.30729.4148 Offset:0002fc96

Any help would be appreciated

Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
user616243
  • 11
  • 1

1 Answers1

2

As the others already stated in their comment it seems to be a problem with the dependencies of your sdbm.dll. The simplest way to find out the root cause you should get a copy of DependencyWalker and throw your sdbm.dll into it. First on a machine where it runs without any problems and afterwards start DependencyWalker on one of the problematic machines to see it's output.

It gives you some informations about what DLLs it couldn't found on the current machine. Thous leading you to the problematic libraries.

Nearly always the problem is a missing Visual C++ Redistributable Package (2005, 2008, 2010) or that your library is compiled and deployed as debug version. In this case it will link to the debug versions of e.g. mfcxx.dll by using the mfcxxd.dll. But these debug versions are only installed with the corresponding SDK (or Visual Studio) and not with the redistribution package. Thus leading to problem on the user machine but not no a developer machine.

Oliver
  • 43,366
  • 8
  • 94
  • 151
  • In the first PC after installing the Visual C++ Redistributable Package, the problem got solved. But In the second PC it doesn't work and in dependency walker also it doesn't give any errors. – user616243 Feb 16 '11 at 04:33
  • @user616243: For the second pc i have no real idea. One possibility could be an injector dll (from av program or virus) or something has to be configured through the *manifest file* (but i don't have any experience with this). Maybe [this question](http://stackoverflow.com/questions/4780652) can help you to dig a little bit deeper. – Oliver Feb 16 '11 at 07:42
  • The c++ dll(sdbm.dll) is trying to start SSL communication with a system. Suring this time the C# application is getting crashed – user616243 Feb 19 '11 at 04:17