Microsoft Speech Platform
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
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | pUnkObject is bad or invalid. |
E_OUTOFMEMORY | Exceeded available memory. |
FAILED(hr) | Appropriate error message. |