DLLImport dosn't find my dll... why?

Announcements and discussion for PInvoke

Moderators: Luke Jefferson, Robert

DLLImport dosn't find my dll... why?

Postby fabio_Mastria » Thu Oct 25, 2007 9:59 am

Hi all

I have a dll wirtten by me. Where have to be positioned in order to be seen by DLLImport (I'm in C# .net 2.0)

The dll have to be registered?
fabio_Mastria
 
Posts: 1
Joined: Thu Oct 25, 2007 9:52 am

Postby Brian Donahue » Thu Oct 25, 2007 10:21 am

Hi,

In my experience the dll needs to be in the %SYSTEMROOT%\\System or System32 folders. It may also work in the dll is in one of the foilders listed in your %PATH% environment variable.

DllImport dlls do not require registration. That would more than likely be specific to COM dlls, and to use them from C# you would create an interop dll (tlbimport) rather than platform invoke.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Same issue

Postby Ryan_McNeil » Mon Oct 29, 2007 4:42 pm

Hi,
I have the same issue : it seems that the PInvoke.net Add-In cannot find my private dll. I have copied it in System32 that does appear in the PATH system variable.
Do you have an idea of what is wrong? Is it possible to to achieve this? Or maybe the prototypes are statically saved in the Add-in?
Thanks a lot for your help and your great tool!
Ryan_McNeil
 
Posts: 2
Joined: Mon Oct 29, 2007 4:38 pm


Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests