Problems in loading unmanaged(non COM) win32

M

Mandeep Singh

Development Scenario:
+++++++++++++++++++++
1) I am developing a Visual c# web application.
2) It uses a mixed-mode Managed dll(containing Managed c++
code).
3) This managed dll in turn has static dependency on an
unmanaged(non COM) dll. Note that this dll does not contain
a valid COM component.

What i did:
+++++++++++
1) In my Visual .NET studio for my c# web application, i
created a reference for the managed dll. Also, i put the
unmanaged(non COM dll) in the system Path. As a result of
all this, my c# web application ran perfectly fine.
2) Now i removed the unmanaged(non COM) dll from the system
path. I placed this unmanaged(non COM) dll in my c# web
application's bin directory(not in the system path). Now
when i try running my web application, it gave me an error
message saying "Some error occured while loading the
managed dll or one of its dependencies".

The Real Problem:
+++++++++++++++++
My second test case(mentioned above) doesnt work. Does this
mean that putting the unmanaged(non COM) dll in the system
path is the only way out?
 
R

RedSunBeer

hello,

Usually the dlls should be in the bin directory or more
specifically in the same folder as the executable. Trying
to read a dll from another folder usually would not work
even if you specify the path.

cheers,
RedSunBeer
 

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