Platform SDK: International Features

ScriptStringValidate

The ScriptStringValidate function checks the SCRIPT_STRING_ANALYSIS structure for invalid sequences.

HRESULT WINAPI ScriptStringValidate(
  SCRIPT_STRING_ANALYSIS ssa 
);

Parameters

ssa
[in] A SCRIPT_STRING_ANALYSIS structure for a string.

Return Values

If there are no invalid sequences, the function returns S_OK.

If there are one or more invalid sequences, the function returns S_FALSE. And if any other unrecoverable error is encountered, it is also returned as HRESULT. For example, error returns from Win32 API functions are converted to HRESULT using the HRESULT_FROM_WIN32 macro and returned to the client in the HRESULT.

Remarks

This function is intended for use in editors that reject the input of invalid sequences.

Invalid sequences are only checked for those scripts with the fRejectInvalid member set in SCRIPT_PROPERTIES. For example, it is conventional for Notepad to reject invalid Thai character sequences. However, invalid Indian sequences are not conventionally rejected, but instead are displayed in composition with a missing base character symbol.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Usp10.h.
  Library: Use Usp10.lib.

See Also

Uniscribe Overview, Uniscribe Functions, SCRIPT_PROPERTIES, SCRIPT_STRING_ANALYSIS