dllImport unable to load DLL

C

Chris

I have my own win app developed in VS C# 2005.
This app uses a dll file (I import methods from the library by dllimport
attribute).
The dll file is provided by another program (let's call it program AA) that
is installed on my computer.When I put my app into the folder where program
AA is installed my app works ok (in this case only!). When I put my app into
any other folder (e.g desktop) I am getting error: unable to load dll. I am
getting that error even if I put provided dll with my app file.
I have checked PATH variable - it points out the folder with AA program.
But my app still does not work. Why?
 
W

Willy Denoyette [MVP]

Chris said:
I have my own win app developed in VS C# 2005.
This app uses a dll file (I import methods from the library by dllimport
attribute).
The dll file is provided by another program (let's call it program AA)
that
is installed on my computer.When I put my app into the folder where
program
AA is installed my app works ok (in this case only!). When I put my app
into
any other folder (e.g desktop) I am getting error: unable to load dll. I
am
getting that error even if I put provided dll with my app file.
I have checked PATH variable - it points out the folder with AA program.
But my app still does not work. Why?


Possibly because there are other dll's *the* dll depends on!

Willy.
 
C

Chris

I do not think so. I have checked in Dependency Walker.
Moreover, that happens on one machine only. On any other computers that
works fine.
 
W

Willy Denoyette [MVP]

Chris said:
I do not think so. I have checked in Dependency Walker.
Moreover, that happens on one machine only. On any other computers that
works fine.


"dependency walker" will not tell you anything about dynamically loaded
modules. Point is, the application fails to load a module, to find out witch
one, load the program in the debugger and check the modules loaded when it
works.


Willy.
 
C

Chris

:
"... load the program in the debugger and check the modules loaded when it
works."

Ok, sounds good. The problem happens on a remote machine. Can use remote
debugging?
 

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