Window class name is not valid.

Topics: Developer Forum, User Forum
Feb 19, 2008 at 10:11 AM
I've downloaded ScintillaNet a couple of days ago and got an error in run time. Today, I found a new release, downloaded it, compiled... and got the same problem.
Project compiles flawless, no errors or warnings, but whenever I try to run either SCide project or any other project using ScintillaNet control or even drag&drop compiled control from VS Toolbox on form, I get System.Component.Win32Exception "Window class name is not valid". Exception is thrown in INativeScintilla.SendMessageDirectu(int msg, IntPtr wParam, IntPtr lParam) method, in line number 25 (m.HWnd = Handle;).
Looks like .NET wrapper around original Scintilla control causes some Win32 error. I tried it on .NET 2.0 in both VS2005 and VS2008, and also compiled on .NET 3.5 in VS2008. It never works.
Coordinator
Feb 19, 2008 at 4:26 PM
Edited Feb 19, 2008 at 4:27 PM
This version of ScintillaNET will work with Visual Studio 2005 and 2008 including express editions. ScintillaNET relies on the unmanaged dll SciLexer.dll. If ScintillaNET can't find this dll you will get "Window class name is not valid" exceptions and basically nothing will work. My suggestion is to copy SciLexer.dll to your \Windows\System32 folder on the development PC. When deploying your software, this isn't necessary. Instead just make sure SciLexer.dll is in the same folder as ScintillaNet.dll.
Feb 19, 2008 at 7:06 PM

ChrisRickard wrote:
This version of ScintillaNET will work with Visual Studio 2005 and 2008 including express editions. ScintillaNET relies on the unmanaged dll SciLexer.dll. If ScintillaNET can't find this dll you will get "Window class name is not valid" exceptions and basically nothing will work. My suggestion is to copy SciLexer.dll to your \Windows\System32 folder on the development PC. When deploying your software, this isn't necessary. Instead just make sure SciLexer.dll is in the same folder as ScintillaNet.dll.


Well... sorry :) In short: RTFM.
Ok, next time before I ask a question, I'll read all readme files :)
Just hope, this thread will be of any use for people looking for this kind of error (Maybe there is someone else who doesn't read manuals :| )
Coordinator
Feb 19, 2008 at 10:02 PM
I'm sorry that the original version of my response really came off as RTFM, I quickly edited that part out. For one thing I couldn't have been certain you had downloaded the release instead of the latest code. Which only the release has these instructions (they're also buried deep in this discussion board too). Secondly it's hypocritical for me to give a RTFM like response when I such a serious lack of documentation on the project. And lastly I don't want to be "that guy", that guy's a dick.