Share via


ISpResourceManager::SetObject (SAPI 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

Value
S_OK
E_INVALIDARG
E_OUTOFMEMORY
FAILED(hr)