Platform SDK: International Features

ScriptApplyDigitSubstitution

The ScriptApplyDigitSubstitution function applies the digit substitution settings recorded in a SCRIPT_DIGITSUBSTITUTE structure to the SCRIPT_CONTROL and SCRIPT_STATE structures.

HRESULT WINAPI ScriptApplyDigitSubstitution(
  const SCRIPT_DIGITSUBSTITUTE *psds, 
  SCRIPT_CONTROL *psc, 
  SCRIPT_STATE *pss
);

Parameters

psds
[in] Pointer to a SCRIPT_DIGITSUBSTITUTE structure. If NULL, ScriptApplyDigitSubstitution calls ScriptRecordDigitSubstitution with LOCALE_USER_DEFAULT.
psc
[out] Pointer to a SCRIPT_CONTROL structure. When this function returns, the fContextDigits and uDefaultLanguage members are updated.
pss
[out] Pointer to a SCRIPT_STATE structure. When this function returns, the fDigitSubstitute member will be updated.

Return Values

If the function succeeds, it returns S_OK.

If the DigitSubstitute member of SCRIPT_DIGITSUBSTITUTE structure is unrecognized, the function returns E_INVALIDARG. And if any other unrecoverable error is encountered, it is also returned as an 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

The DigitSubstitute member of SCRIPT_DIGITSUBSTITUTE structure is normally set by ScriptRecordDigitSubstitution. However, it may be replaced by any one of the following values:

Requirements

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

See Also

Uniscribe Overview, Uniscribe Functions, ScriptRecordDigitSubstitution, SCRIPT_CONTROL, SCRIPT_DIGITSUBSTITUTE, SCRIPT_STATE