ISTPhoneConv::FromIPA

HRESULT FromIPA(LPCWSTR pszFromIPA, DWORD *pdwFirstInvalid, LPWSTR pszToSet, DWORD dwNumChars, DWORD *pdwCharsNeeded);

Converts from IPA to the currently specified phone set. If no phone set is specified, it uses the thread's current language to determine which phone set is used. If no default phone set for that language exists then the English phone set is used.

pszFromIPA

[in] NULL terminated IPA string.

pdwFirstInvalid

[out] Filled with an offset in characters, from the beginning of the string, to the first invalid IPA character. If there is an invalid character, it will be ignored and skipped, but the application can display this information to the end user. Filled with (DWORD) -1 if there are no invalid characters.

pszToSet

[out] Buffer to write the converted phones into. The string will be NULL terminated.

dwNumChars

[in] Number of characters available in the buffer. If there aren't enough characters then E_FAIL is returned.

pdwCharsNeeded

[out] Filled in with the number of characters needed to convert the string. This can be NULL.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_FAIL - Buffer is too small.