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

Announcements and discussion for PInvoke

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

Postby fabio_Mastria » Thu Oct 25, 2007 8: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?
Posts: 1
Joined: Thu Oct 25, 2007 8:52 am

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


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: 6590
Joined: Mon Aug 23, 2004 9:48 am

Same issue

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

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!
Posts: 2
Joined: Mon Oct 29, 2007 3:38 pm

Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests