如何在 Windows 7 64 位上的 Visual Studio 2008 Designer 中加载 SciLexer.dll?

发布于 2024-09-03 13:37:39 字数 1101 浏览 4 评论 0原文

我们使用 Scintilla.NET (1.7) 组件开发一个 WinForm 应用程序,该组件使用 SciLexer.dll(未命名)。在运行时,我们分发 32 位和 64 位 SciLexer.dll,并在应用程序启动时加载正确的 SciLexer.dll(一切正常)。

在我们的新开发环境(Windows 7 64 位)上,我们所有的解决方案都可以正常构建和运行,但 WinForm 可视化设计器不会加载使用 Scintilla.NET 的表单/控件,因为它无法加载正确的 SciLexer.dll:

Window class name is not valid. 

at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()
at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg, IntPtr wParam, IntPtr lParam)
at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg)
at Scintilla.ScintillaControl.get_CodePage()
at Scintilla.ScintillaControl..ctor(String sciLexerDllName)
at Scintilla.ScintillaControl..ctor() 

Visual Studio 2008 在哪里查找非托管库?我尝试将 64 位 SciLexer.dll 放在 SysWOW64 中引用 ScintillaNET.dll 的文件夹中,在 PATH 系统变量中添加一个文件夹,在项目中添加一个文件夹引用,但我不断收到此错误。

任何帮助表示赞赏。

We develop a WinForm application using Scintilla.NET (1.7) component, which uses SciLexer.dll (unamnaged). At run-time, we distribute both 32bit and 64bit SciLexer.dll, and we load the correct one when the application starts (everything works fine).

On our new development environments (Windows 7 64-bit), all our solutions build and run just fine, but the WinForm visual designer does not load our forms/controls which use Scintilla.NET, because it cannot load the correct SciLexer.dll:

Window class name is not valid. 

at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()
at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg, IntPtr wParam, IntPtr lParam)
at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg)
at Scintilla.ScintillaControl.get_CodePage()
at Scintilla.ScintillaControl..ctor(String sciLexerDllName)
at Scintilla.ScintillaControl..ctor() 

Where does Visual Studio 2008 look for unmanaged libraries? I tried putting the 64-bit SciLexer.dll in SysWOW64, in the folder where ScintillaNET.dll is referenced, adding a folder in PATH system variable, adding a folder reference in the project, but I keep getting this error.

Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱殇璃 2024-09-10 13:37:39

好吧,我想通了:我是 64 位系统上的菜鸟,我认为 SysWOW64 文件夹是用于 64 位库的:) 将

32 位 SciLexer.dll 放入 SysWOW64 中就像一个魅力。

Ok, I figured it out: I am a total noob on 64-bit systems, and I thought the SysWOW64 folder was for 64-bit libraries :)

Putting the 32-bit SciLexer.dll in SysWOW64 works like a charm.

桃扇骨 2024-09-10 13:37:39

刚刚遇到同样的错误。您可以将这些 dll 的位置添加到 PATH 环境变量中,而不是搞乱操作系统文件夹(不要忘记重新启动 VS 以使更改生效)

Just got the same error. Instead of messing up with your OS folders, you could add the location of those dlls to the PATH environment variable (don't forget to restart your VS for the changes to take effect)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文