Asp.Net C# DllImport problem

Posted by user346665 on Stack Overflow See other posts from Stack Overflow or by user346665
Published on 2011-01-09T02:15:19Z Indexed on 2011/01/09 8:53 UTC
Read the original article Hit count: 256

Filed under:
|
|
|

Hi,

I want to import DLL file in my web site project. I have dll file "my.dll" in folder C:\DLLDir and I'm using the code :

[DllImport("C:\\DLLDir\\my.dll", EntryPoint = "Out32")]

This works ok. But I want to use relative path (web site root path) . I'm trying to put "my.dll" in "bin" or root folder and I'm using the code :

   [DllImport("my.dll", EntryPoint = "Out32")]

but I'm getting the error: Unable to load DLL 'my.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Any ideas?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET