ASP.NET Load unmanaged dll from bin folder

Posted by Quandary on Stack Overflow See other posts from Stack Overflow or by Quandary
Published on 2010-05-25T17:56:59Z Indexed on 2010/05/25 18:01 UTC
Read the original article Hit count: 631

Filed under:
|
|
|
|

Question: I use an embedded Firebird database in ASP.NET.

Now, Firebird has a .NET wrapper around native dlls.

The problem is, with the .NET compilation and execution process, the dlls get shadow copied to a temporary folder. Unfortunately, only the .NET dlls, and not the native dll.

See http://msdn.microsoft.com/en-us/library/ms366723.aspx for details.

Now, this makes it necessary to put the unmanaged dll somewhere into the system32 directory (or any other directory in the path environment variable).

Now, I want to change the wrapper/native dll (opensource), so it loads the dll also if they are only in the bin folder.

Now, my problem is, how can I, in .NET, load an unmanaged dll from an absolute path ?
The absolute path is determined at runtime, not at compile-time...

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET