FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Spell Check / Stack Overflow / Registry
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Spell Check / Stack Overflow / Registry
Posted: Fri Feb 29, 2008 09:37 PM

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

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Spell Check / Stack Overflow / Registry
Posted: Sat Mar 01, 2008 05:38 AM

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

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
INI
Posted: Sun Mar 02, 2008 04:15 PM

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 !

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion