tags:

views:

316

answers:

3

Hello,

I have a simple C DLL (not COM). I have also a C# 2.0 application that runs it (dllimport). The dll is placed in the exe of the application. I know that the dll is ok and also that my application that calls it success reading it, but when I move them to another computer it says that it can load the dll.

The error : "Unable to load the dll name.dll . This application has failed to start because the application configuration is incorrect."

I used visual studio 2005 to create the dll. The targer computer is a side by side one. When I took the folder of the side by side contains the CRT it didn't run. Thanks

+3  A: 

The C Dll can have various dependencies. Try using Dependency Walker tool to determine if there are any of them.

Vadmyst
I used the dpendency walker and found the dll depends are found.I used visual studio 2005 to create the dll. The targer computer is a side by side one. When I took the folder of the side by side contains the CRT it didn't run. Thanks
Roman Dorevich
+2  A: 

Windows may have detected a side-by-side version configuration issue with your application.

For example, the C dll will usually be compiled against a particular version of the Microsoft C runtime library , which might not be installed on your second computer. It also doesn't have to be the C runtime library, it may be some other library.

How to diagnose it?

Check out this article, http://blogs.msdn.com/junfeng/archive/2006/04/14/576314.aspx for a starting point, although no guarantees.

Tim Lovell-Smith
I used visual studio 2005 to create the dll. The targer computer is a side by side one. When I took the folder of the side by side contains the CRT it didn't run. Thanks
Roman Dorevich
A: 

I used a lot from the comments people wrote and they are right. I used : Dependency Walker tool and process moniter and process explorer. I had a prblem of not detecting the right msvr80 at runtime by my application. I instaalled destributable package af VC++ amd didn't help. The answear was in another discussion here and it http://stackoverflow.com/questions/1420629/side-by-side-configuration-error-microsoft-vc80-crt-v8-0-50608-0 It was a problem of security update : Microsoft.VC80.CRT v8.0.50727.4053 (Installed via a security update).

Roman Dorevich