SetFactoid function (recapis.h)
Specifies the factoid a recognizer uses to constrain its search for the result.
You specify a factoid if an input field is of a known type, such as if the input field contains a date. You call this function before processing the ink for the first time. Therefore, call the SetFactoid function before calling the Process function.
Syntax
HRESULT SetFactoid(
HRECOCONTEXT hrc,
ULONG cwcFactoid,
const WCHAR *pwcFactoid
);
Parameters
hrc
Handle to the recognizer context.
cwcFactoid
Number of characters in pwcFactoid.
pwcFactoid
Identifies the factoid to use on the recognizer context. The string is not NULL-terminated.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
The specified factoid is not supported. |
|
You must call the SetFactoid function before calling the Process function. |
|
The context is invalid or one of the parameters is an invalid pointer. |
|
The recognizer does not support this function. |
|
Unable to allocate memory to complete the operation. |
|
An unspecified error occurred. |
|
The context contains an invalid value. |
Remarks
For a list of factoids that can be passed in the cwcFactoid parameter, see Supported Factoids from Version 1. The DEFAULT factoid listed in that topic is not a valid value to pass to SetFactoid; the Tablet PC Platform API's internally convert DEFAULT to NULL before calling the SetFactoid function.
It is recommended that you limit the length of the factoid string to no more than 32768 characters.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP Tablet PC Edition [desktop apps | UWP apps] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | recapis.h |
DLL | inkobjcore.dll |