I am using VS 2008 to develop an application that uses a .dll with P/Invoke. I can successfully use the dll when I use an absolute path. For example, this DOES work:
[DllImport("C:\\myDLL.dll")] internal static extern bool isReady();
this DOES NOT work:
[DllImport("myDLL.dll")] internal static extern bool isReady();
I have tried adding a reference folder and adding the dll to the project folder but neither work. I need to deploy this application on other computers and need to make sure this .dll is included. Thanks for the help!
I forgot to mention when I try to do that I get this error:
Microsoft Visual Studio A reference to 'C:\Users\dlugokja\Documents\Visual Studio 2008\Projects\DinamapN.sln(1)\DinamapN\DinamapN\DinaWin.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. OK