lapucca
asked on
Error of not able to find the dll that is in the installed directory.
Hi, I'm using vs2005, .net 2, C# for windows application. In my application, I use a C-compiled dll for some of it's functions. It works on my devvelopment PC if I have this dll in my application-drive\bin\rele ase folder. I created a Setup project for the application. In the file syste, I added the dll. After successful installation on a target machine, I get error of not able to find the dll. I checked the program files directory and the dll is there. Can someone tell me what's wrong here and how can I solve this? Thank you.
ASKER
Thank you but it's a plain old C dll.
ASKER
I'm sorry but the question is not clear abou the type of dll. The dll is just plain C code. I compiled it in VS2005's C++ compiler to produce a dll.
All I can think of is to check whether you are using either relative or absolute paths (whichever is appropriate, double check) and whether the program has permissions to access the folder.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Steve,
No, there isn't a interop created with the file name. Here is how that dll is imported to my applicatinon by the following declareation. Thanks.
[DllImport("UnityDecodeAsn User.dll", CharSet = CharSet.Unicode)]
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);
No, there isn't a interop created with the file name. Here is how that dll is imported to my applicatinon by the following declareation. Thanks.
[DllImport("UnityDecodeAsn
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);
ASKER
Oh, Also, I'm not able to add this dll to my project as reference.
ASKER
I found the problem is the C-code dll has a dependency on MSVCR80.dll. Once I copied that to the target PC it ran OK. Thank you.
--
Thanks.
--
Thanks.
if it is a COM dll, this may apply...
http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/
look for the section:
Isolating COM Components
and make sure to read the limitations of reg free com sidebar, to assure that any limitations do not apply to your specific scenario.