ISRGramCommon::DeteriorationGet

HRESULT DeteriorationGet(DWORD *pdwMemory, DWORD *pdwTime,

DWORD *pdwObjects);

Retrieves the values used by the engine to determine how long to retain data stored in speech-recognition results objects.

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

E_INVALIDARG
E_OUTOFMEMORY
SRERR_NOTSUPPORTED
SRERR_VALUEOUTOFRANGE

pdwMemory

[out] Address of a variable that receives the amount of memory allowed for storage of speech-recognition results objects in this grammar object. If the memory required to store the existing results objects is larger than pdwMemory, older results objects begin to deteriorate.

pdwTime

[out] Address of a variable that receives the number of seconds a results object is allowed to exist in this grammar object. If a results object is older than the number of seconds it is allowed to exist, it begins to deteriorate.

pdwObjects

[out] Address of a variable that receives the maximum number of results objects allowed at one time in this grammar object. If more than maximum number of results objects exist, older results objects start to deteriorate.

As a results object ages, an engine discards certain amounts of its data to conserve memory (exactly which data is discarded depends on the engine). An application can prevent a results object from deteriorating by calling the ISRResMemory::LockSet member function to lock the object.

If an object deteriorates, the application's requests for data will fail. An application can identify what data is available by calling the ISRResMemory interface.