Jump to content

Where do i put .dlls for DLLImport?


Recommended Posts

Guest Kingherc
Posted

Well, I write a program for SmartPhones 2003 using VisualStudio2003.NET based on .net compact framework.

Now, I need to use some functions of a .dll (unnmanaged code - non .net). I figured I should use something like

_

Public Shared Function NameOfFunction() As String

End Function

. But although the above lines are correct, the debug throws a NotSupportedException. Maybe the .dll file cannot be found. I'd like to ask where do I put the .dll file to use it in such a way?? I just copied it in the folder but it still doesn't work. Also, I did the same for an application for Windows and it works! Maybe the .dll isn't meant for Smartphones? (though I tested only one function that returns a simple string).

Please some help. Where do I put the .dll files??

Guest gadgetfbi
Posted

what dll file are you trying to access?

From my understanding (what little of it I have) the dll should just be in the app root directory, unless of course its a windows dll - in which case there is no need to do anything. - I think!!

Guest Kingherc
Posted

I have tried to put it in the root directory but still it doesn't work... It's a dll called FreeImage. Anyways...

  • 1 month later...
Guest Peter Foot
Posted

If you want to refer to the dll without the full path it should go in one of the following folders:-

The folder into which your app is deployed

The windows folder (this will be lost on a reset / power-off)

The StorageWindows folder

The root folder (again this will be lost on a power off)

Therefore if it is unique to your app place it in your application folder, else use StorageWindows

Peter

  • 9 months later...
Posted

to:

\storage\windows\yourdll.dll (in Smartphone)

your .Net application will find it

but for Emulator I don't know how to do it.

Guest sharpstuff
Posted

I always just add DLLs to my Visual Studio project and let it take care of deploying my DLLs, and other resources.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.