Page 1 of 1

Spell Check / Stack Overflow / Registry

Posted: Fri Feb 29, 2008 9:37 pm
by TimStone
OK ... so for several years I've had the following working perfectly to use the Wintertree spell checker. In the past 72 hours we started getting GPF's. The possibilities include a stack overflow ( they suggest we might need to increase stack size for the application, but how is this done ? ), or possibly the Vista registry is being a pain !

I wondered if a Windows update might have caused this sudden onset.

The system GPF's on the call SSCE-SetRegTreeName

Here is the total code:


FUNCTION Spellone( TxtString )
LOCAL pText := TxtString
LOCAL pTextLen, pNewLen
LOCAL cDicPath := DiskName( ) + ":\" + TRIM(CurDir( ) ) + "\"
PRIVATE hDLX2
MEMVAR oWnd

pTextLen := LEN( pText )
pText += SPACE(250)
pNewLen := LEN ( pText )
hDLX2 := LoadLibrary( "SSCE5532.dll" )
SSCE_SetKey( 1111111111 )

// GPF's on the following call ....
SSCE_SetRegTreeName( "HKEY_LOCAL_MACHINE\SOFTWARE\MasterLink\SSCE" )


SSCE_CheckBlockDlg( oWnd, @pText, pTextLen, pNewLen )
FreeLibrary( hDLX2 )

RETURN( pText ) // TxtString )


FUNCTION SetDict

LOCAL oReg, cName, uVar, cDicPath
cDicPath := DiskName( ) + ":\" + TRIM(CurDir( ) ) + "\"
MsgInfo( cDicPath )

oReg := TReg32():Create( HKEY_LOCAL_MACHINE, "SOFTWARE\Masterlink\SSCE" )
// Call Set with an empty string to access the default key
oReg:Set( "MainLexPath", cDicPath )
oReg:Set( "UserLexPath", cDicPath )
oReg:Set( "MainLexFiles", "ssceam.tlx,ssceam2.clx" )
oReg:Set( "UserLexFiles", "userdic.tlx,correct.tlx,html.tlx" )
MsgStop( "Windows registry updated!" )
oReg:Close()

RETURN NIL


DLL32 FUNCTION SSCE_SetKey( pID AS LONG ) AS LONG PASCAL LIB hDLX2 // "SSCE5532.DLL"

DLL32 FUNCTION SSCE_CheckBlockDlg( pHandle AS LONG, pText AS STRING, pTextLen AS LONG, pNewLen AS LONG ) ;
AS LONG PASCAL LIB hDLX2 // "SSCE5532.DLL"

DLL32 FUNCTION SSCE_SetRegTreeName( pRegName AS STRING ) AS LONG LIB hDLX2 // "SSCE5532.DLL"


Thoughts would be greatly appreciated

Tim

Re: Spell Check / Stack Overflow / Registry

Posted: Sat Mar 01, 2008 5:38 am
by Richard Chidiak
Tim

I use the same product since years as you know,

The main difference is that i have chosed INI settings instead of regsitry. So far, so good the system is working as expected on all OS including vista, if you want me to share the code for ini serttings, etc let me know

HTH

Richard

INI

Posted: Sun Mar 02, 2008 4:15 pm
by TimStone
This has been a sudden issue. The ini setting code would be appreciated. I'm going to actually work with that option today but your code would confirm what I do. It is all very strange !