Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello.

 

I want to add a reference to a dll file named SciLexer.dll (scintilla/notepad++ related dll) but it gives me this error:

 

"A reference to <file directory here> could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component."

 

Any ideas?

Posted

Using a standard DLL

 

If it isn't a .NET or COM DLL, then it is likely that the DLL is a "standard" DLL which exports one or more functions. There are tools which allow you to find out the names of functions exported by a DLL, but the names and even signatures of the functions are unlikely to be enough to know how to use the DLL properly.

 

Calling standard DLL functions from .NET can be achieved using DllImport and marshalling. This is a common technique for invoking native Win32 functions, and there is plenty of information in these forums relating to that - providing, of course, you know how the DLL works.

 

Do you have any documentation for the DLL?

 

Good luck :cool:

Never trouble another for what you can do for yourself.
Posted

Re: Using a standard DLL

 

If it isn't a .NET or COM DLL, then it is likely that the DLL is a "standard" DLL which exports one or more functions. There are tools which allow you to find out the names of functions exported by a DLL, but the names and even signatures of the functions are unlikely to be enough to know how to use the DLL properly.

 

Calling standard DLL functions from .NET can be achieved using DllImport and marshalling. This is a common technique for invoking native Win32 functions, and there is plenty of information in these forums relating to that - providing, of course, you know how the DLL works.

 

Do you have any documentation for the DLL?

 

Good luck :cool:

 

Nope,I don't have

  • Leaders
Posted

Re: Using a standard DLL

 

The process of interoperating with a non-COM DLL is formally called P/Invoke (platform invoke). Like MrPaul said, needing documentation is a fact of life working with standard DLLs. If you do get that documentation, Microsoft has a comprehensive tutorial on P/Invoke.

[sIGPIC]e[/sIGPIC]
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...