Error of not able to find the dll that is in the installed directo

G

Guest

Hi, I'm using vs2005, .net 2, C# for windows application. In my application,
I use a C coded file that I use VS to compile into a dll for some of it's
functions. It works on my devvelopment PC. 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
when I run the applicaiton. I checked the program files directory and this
dll is there. Can someone tell me what's wrong here and how can I solve
this?
The dll is just plain C code. I compiled it in VS2005's C++ compiler to
produce a dll. There isn't a interop created with the file name. Here is
how that dll is imported to my applicatinon by the following declareation.

[DllImport("UnityDecodeAsnUser.dll", CharSet = CharSet.Unicode)]
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);
 
M

Mr. Arnold

Pucca said:
Hi, I'm using vs2005, .net 2, C# for windows application. In my
application,
I use a C coded file that I use VS to compile into a dll for some of it's
functions. It works on my devvelopment PC. 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
when I run the applicaiton. I checked the program files directory and
this
dll is there. Can someone tell me what's wrong here and how can I solve
this?
The dll is just plain C code. I compiled it in VS2005's C++ compiler to
produce a dll. There isn't a interop created with the file name. Here is
how that dll is imported to my applicatinon by the following declareation.

[DllImport("UnityDecodeAsnUser.dll", CharSet =
CharSet.Unicode)]
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);

What happens if you try to register that dll with regsrv32? I know I know,
you shouldn't have to do that. But will happen if you if you tried it?
 
G

Guest

Mr. Arnold said:
Pucca said:
I use a C coded file that I use VS to compile into a dll for some of it's
functions. It works on my devvelopment PC. 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
when I run the applicaiton. I checked the program files directory and
this
dll is there. Can someone tell me what's wrong here and how can I solve
this?
The dll is just plain C code. I compiled it in VS2005's C++ compiler to
produce a dll. There isn't a interop created with the file name.
Here is
how that dll is imported to my applicatinon by the following
declareation.

[DllImport("UnityDecodeAsnUser.dll", CharSet =
CharSet.Unicode)]
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);

What happens if you try to register that dll with regsrv32? I know I
know, you shouldn't have to do that. But will happen if you if you tried
it?

regsvr32 (I assume regsrv32 is a typo) on a Win32 DLL ????

Arne
 
M

Mr. Arnold

Arne said:
Mr. Arnold said:
Pucca said:
I use a C coded file that I use VS to compile into a dll for some of
it's
functions. It works on my devvelopment PC. 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
when I run the applicaiton. I checked the program files directory
and this
dll is there. Can someone tell me what's wrong here and how can I solve
this?
The dll is just plain C code. I compiled it in VS2005's C++ compiler to
produce a dll. There isn't a interop created with the file name.
Here is
how that dll is imported to my applicatinon by the following
declareation.

[DllImport("UnityDecodeAsnUser.dll", CharSet =
CharSet.Unicode)]
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);

What happens if you try to register that dll with regsrv32? I know I
know, you shouldn't have to do that. But will happen if you if you
tried it?

regsvr32 (I assume regsrv32 is a typo) on a Win32 DLL ????

Arne

I always spell it wrong. I only worked with Com, Com+ and .Net dll(s). I
don't know about a Win32 dll, never had the opportunity to work with
C++, if that's what you're referring to.
 
G

Guest

Thank you both for the reply. 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.
--
Thanks.


Mr. Arnold said:
Arne said:
Mr. Arnold said:
I use a C coded file that I use VS to compile into a dll for some of
it's
functions. It works on my devvelopment PC. 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
when I run the applicaiton. I checked the program files directory
and this
dll is there. Can someone tell me what's wrong here and how can I solve
this?
The dll is just plain C code. I compiled it in VS2005's C++ compiler to
produce a dll. There isn't a interop created with the file name.
Here is
how that dll is imported to my applicatinon by the following
declareation.

[DllImport("UnityDecodeAsnUser.dll", CharSet =
CharSet.Unicode)]
public static extern DE_ERRORS DecodeAsnGroup(ref Blob blob,
[In, Out]CGroupContextData m);

What happens if you try to register that dll with regsrv32? I know I
know, you shouldn't have to do that. But will happen if you if you
tried it?

regsvr32 (I assume regsrv32 is a typo) on a Win32 DLL ????

Arne

I always spell it wrong. I only worked with Com, Com+ and .Net dll(s). I
don't know about a Win32 dll, never had the opportunity to work with
C++, if that's what you're referring to.
 
W

Willy Denoyette [MVP]

Pucca said:
Thank you both for the reply. 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.
--

Which is exactly what you shouldn't have done! If your C++ code depends on
the VC8 runtime, you'll have to distribute this run-time with your
application, or you have to statically link when building your DLL.

Willy.
 
G

Guest

Hi Willy,
Yes, I already done that, adding that runtime dll in my installation. I
would have liked to static link it but didn't find such option in the project
property Link area. would you know how I can do static link in vs 2005? Or
do you think static Link is a better solution than adding the file to my
installation files ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top