Avatar of lapucca
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\release 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.
InstallationC#

Avatar of undefined
Last Comment
lapucca

8/22/2022 - Mon
steveberzins

a plain old C dll, or is it a COM dll?

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.
lapucca

ASKER
Thank you but it's a plain old C dll.  
lapucca

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.  
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
icr

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
steveberzins

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
lapucca

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("UnityDecodeAsnUser.dll", CharSet = CharSet.Unicode)]
            public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
                 [In, Out]CGroupContextData m);
lapucca

ASKER
Oh, Also, I'm not able to add this dll to my project as reference.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
lapucca

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.