Menu

#7 VS IDE sometimes complains due to SCILexer.dll

v1.0_(example)
open
nobody
5
2006-01-11
2006-01-11
kevini
No

Sometimes VS does things to the project and if the
SciLexer.dll is not in the winnt or a vs folder,
Scintilla will not work. Replacing the LoadLibrary()
function call with this:

private void LoadLexerLibrary()
{
IntPtr lib;
// Generally, loading the scilexer from the working
folder will work fine
lib = WinAPI.LoadLibrary("SciLexer.dll");
if (lib.ToInt32() <= 0)
// Sometimes the VS IDE will instantiate this
using a VS folder as the base, so
// if the sciLexer fails to be found there, we
force it to look at the base directory
WinAPI.LoadLibrary
(AppDomain.CurrentDomain.BaseDirectory
+ "SciLexer.dll");
}

will make the loading a bit more robust so that if the
scilexer is not found in the path according to vs,
then the appdomain's base directory will also be
checked.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB