[ScintillaNET] Re: A Modification Event Handler Bug

  • From: Greg Dietsche <greg@xxxxxxxxx>
  • To: scintillanet@xxxxxxxxxxxxx
  • Date: Thu, 24 Jun 2004 10:07:15 -0500

Grrr, I was using my app this morning, and the same exception occurred. Unfortunately, I wasn't thinking, and didn't attach the process to the debugger.
I'm pretty sure the problem lies in the System.Runtime.InteropServices.Marshal.PtrToStringAuto(scn.text) call.


I'm going to try making a small change
System.Runtime.InteropServices.Marshal.PtrToStringAuto(scn.text, scn.length)
and see if that helps. Otherwise, using the Windows API might not be such a bad idea. There is an api called IsBadStringPtr ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/isbadstringptr.asp ) which would probably suit our purposes well.


I'll report back when things seem to start working :) Other than that, you're welcome :)

Regards,
/*Greg Dietsche*/**     http://www.gregd.org/ <http://www.gregd.org>
*GForce Programming:*   http://calc.gregd.org
*Detached Solutions:*      http://www.detachedsolutions.com

**



Garrett Serack wrote:

I'll put this into the next build.



Thanks!



Garrett



------------------------------------------------------------------------

** **

Other related posts: