Sentry Spelling Checker Engine - Support |
Home Site index Contact us Catalog Shopping Cart Products Support Search |
You are here: Home > Support > Sentry Spelling Checker Engine > Causes of return code -13 (SSCE_UNSUPPORTED_ACTION_ERR)
Product: Sentry Spelling Checker Engine Windows SDK
Problem: Some functions in the Sentry API return -13 (SSCE_UNSUPPORTED_ACTION_ERR). This document describes some of the reasons for this return code.
When a function in the Sentry API returns -13 (SSCE_UNSUPPORTED_ACTION_ERR), check the following:
Make sure your application calls SSCE_SetKey before any other Sentry functions (not just the one that returned -13). SSCE_SetKey should be the first Sentry function called by your application.
Make sure the license key you pass to SSCE_SetKey is valid:
If you are evaluating the Sentry Windows SDK, your license key may have expired.
In version 5.16 and later, the license key is provided as a decimal constant. Pass the license key to SSCE_SetKey exactly as it is provided by Wintertree Software. In versions of Sentry Windows SDK prior to 5.16, the license key was provided as a hexadecimal constant. When you use hexadecimal constants, you must encode them correctly for the programming language you are using:
C, C++, and C#: Prefix with "0x", as in 0xABCD1234
Visual Basic and VB.NET: Prefix with "&H", as in &HABCD1234
Delphi: Prefix with "$", as in $ABCD1234
Make sure you are using the license key provided with the copy of the Sentry DLL you are using. If you upgrade, do not use a license key provided with an older version of the DLL with the current version.
If a SSCE_xxxDlgTmplt function (e.g., SSCE_CheckCtrlDlgTmplt) returns -13, the problem may be caused by your dialog box template or the instance handle you pass to the function. The Sentry DLL calls the DialogBox function in the Windows API to display the dialog using the template you pass. If DialogBox returns -1, the SSCE_xxxDlgTmplt function will return -13. One common cause of DialogBox failure is passing the dialog template's numeric resource id rather than the template name. Dialog templates can be referenced using a name (string) or a number. When they are referenced using numbers, typically a preprocessor symbol such as IDD_MYDIALOG is assigned by the resource editor. Passing "IDD_MYDIALOG" as the template-name parameter to SSCE_xxxDlgTmplt will fail, because there is no dialog template named "IDD_MYDIALOG"; rather, there is a dialog template with a number assigned to it, such as 123, and the resource editor creates an include file which maps IDD_MYDIALOG to 123. The solution is to assign names to your dialog templates which are passed to SSCE_xxxDlgTmplt functions. This is usually done in resource editors by surrounding the resource id with quotation marks: "MYDIALOG".
Other situations in which the Sentry DLL will return -13:
Calling SSCE_CompressLexEnd or SSCE_CompressLexFile without having called SSCE_CompressLexInit first;
Passing an unrecognized character set id to SSCE_SetCharSet;
Passing an action code other than SSCE_IGNORE_ACTION to SSCE_AddToLex when the lexicon being modified was not created by the Sentry engine;
Attempting to open a compressed lexicon containing Unicode characters (i.e., a lexicon compressed using the Unicode spelling engine);
Calling SSCE_CheckCtrlBackground on a control which is not a rich edit control or the type of which cannot be determined;
Calling SSCE_AddToLex, SSCE_DelFromLex, SSCE_ClearLex, SSCE_GetLex, or SSCE_SyncLex on a compressed lexicon.
Copyright © 2015 Wintertree Software Inc.