ISTPhoneConv::ToIPA

HRESULT ToIPA(LPCWSTR pszFromSet, DWORD *pdwFirstInvalid, LPWSTR pszToIPA, DWORD dwNumChars, DWORD *pdwCharsNeeded);

Converts from the currently specified phone set to IPA. 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.

pszFromSet

[in] NULL terminated string with the phonemes.

pdwFirstInvalid

[out] Filled with an offset in characters, from the beginning of the string, to the first invalid text 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.

pszToIPA

[out] Buffer to write the converted IPA 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.