Platform SDK: International Features

ScriptIsComplex

The ScriptIsComplex function determines whether a Unicode string requires complex script processing.

HRESULT WINAPI ScriptIsComplex(
  const WCHAR *pwcInChars,
  int cInChars,
  DWORD dwFlags
);

Parameters

pwcInChars
[in] Pointer to the string to be tested.
cInChars
[in] Length of the string, in characters.
dwFlags
[in] This parameter can be one of the following values.
Value Meaning
SIC_ASCIIDIGIT Treats digits U+0030 to U+0039 as complex. Set this flag if the string would be displayed with digit substitution enabled. If you are following the user's NLS settings using the ScriptRecordDigitSubstitution API, you can pass SCRIPT_DIGITSUBSTITUTE.DigitSubstitute != SCRIPT_DIGITSUBSTITUTE_NONE.
SIC_COMPLEX Treats complex script letters as complex. This should normally be set.
SIC_NEUTRAL Treats neutrals as complex. Set this flag if you might be displaying the string with RTL reading order.

Return Values

The function returns S_OK if the string requires complex script processing. The function returns S_FALSE if the string can be handled by standard API calls, that is, the string contains only characters laid out side-by-side and left-to-right. 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.

Requirements

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

See Also

Uniscribe Overview, Uniscribe Functions, ScriptRecordDigitSubstitution, SCRIPT_DIGITSUBSTITUTE