ISRResGraph::BestPathPhoneme

HRESULT BestPathPhoneme(DWORD dwRank, DWORD *padwPath, DWORD dwPathSize,

DWORD *pdwPathNeeded);

Retrieves the specified phoneme path from the list of most likely phoneme paths provided by the speech-recognition engine for a recognition.

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

E_INVALIDARG
E_OUTOFMEMORY
SRERR_NOTENOUGHDATA
SRERR_NOTSUPPORTED
SRERR_VALUEOUTOFRANGE

dwRank

[in] Specifies the alternative path to get from the alternatives provided by the engine, starting with dwRank==0 for the strongest alternative. If dwRank is greater than the number of alternatives, BestPathPhoneme returns an error.

padwPath

[out] Address of an array that receives the node numbers that constitute the path.

dwPathSize

[in] Number of bytes available in padwPath. If the number is too small, BestPathPhoneme returns an error and fills in pdwPathNeeded with the number of bytes needed.

pdwPathNeeded

[out] Number of bytes needed to store the path data.

You can calculate the number of node numbers returned in padwPath by dividing the value of pdwPathNeeded by the size of a double word (sizeof(DWORD)).