DLLImport path length issue

  • Thread starter Thread starter Irfan
  • Start date Start date
I

Irfan

Hi,

I tried the same, but did not get any such
error/exception. Here's my path to the win32 DLL that I
reference in my C# code with VS.NET 2003 and .NET
framework 1.1

[DllImport(@"D:\Irfan\New Folder (2)\New Folder (2)\New
Folder\New Folder\New Folder\New Folder\New Folder\New
Folder\TRACFSK.dll")]
public static extern Int32
TRACFSK_RegisterCaller(ref Int32 miCaller);
[DllImport(@"D:\Irfan\New Folder (2)\New
Folder (2)\New Folder\New Folder\New Folder\New Folder\New
Folder\New Folder\TRACFSK.dll")]
public static extern Int32
TRACFSK_unRegisterCaller(Int32 miCaller);


Here's the code I used

Int32 liRegisterVal = TRACFSK_RegisterCaller(ref miCaller);
MessageBox.Show
(liRegisterVal.ToString());
Int32 lival2 =
TRACFSK_unRegisterCaller(miCaller);

Thanks,
irfan
 
Perhaps it's not the path length to the dll, but rather to the executable calling the dll that is the issue. Was your executable in the same directory?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top