pulling in native DLLs from multiple other paths

N

not_a_commie

I'm working on an application that uses some native DLLs from a
separate application. I need those DLLs to be in the search path. I
was going to use SetDllDirectory, but I can only specify one extra
path with that command as subsequent calls override the previous call.
What's the easiest way to add two folders to the DllImport resolve
path?
 
A

Arne Vajhøj

I'm working on an application that uses some native DLLs from a
separate application. I need those DLLs to be in the search path. I
was going to use SetDllDirectory, but I can only specify one extra
path with that command as subsequent calls override the previous call.
What's the easiest way to add two folders to the DllImport resolve
path?

Can you use full path to the DLL's in your DllImport
attributes?

Arne
 
N

not_a_commie

Can you use full path to the DLL's in your DllImport
attributes?

As far as I know (and a web search confirms), you cannot use the full
path in the DllImport attribute. On top of that, I need to use
environment variables to determine the first part of the path --
further hampering the idea of a static attribute path.
 

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