ISpResourceManager::SetObject (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

ISpResourceManager::SetObject

ISpResourceManager::SetObject adds a COM object to the current service list. If an object is already set for the specified service, the ISpResourceManager::SetObject method will replace the current object with the new one. If pUnkObject is NULL, the current service object is removed.

HRESULT SetObject(
   REFGUID     guidServiceId,
   IUnknown   *pUnkObject
);

Parameters

guidServiceId
[in] The unique identifier of the service.
pUnkObject
[in] Address of the IUnknown interface of the object that is setting the service. Any existing service object is removed if this parameter is NULL.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGpUnkObject is bad or invalid.
E_OUTOFMEMORYExceeded available memory.
FAILED(hr)Appropriate error message.
Show: