Adding a reference to a non-COM component.

Nikolas II

New member
Joined
Aug 21, 2008
Messages
2
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?
 
Using a standard DLL

If it isnt 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:
 
Re: Using a standard DLL

If it isnt 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 dont have
 
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.
 
Back
Top