Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

CSpEvent::Serialize

CSpEvent::Serialize copies an event instance and then serializes the new instance. The new instance must be based on SPSERIALIZEDEVENT or SPSERIALIZEDEVENT64.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>void Serialize(</strong> <strong>T</strong> *<em>pSerEvent</em> <strong>);</strong></pre>

Parameters

  • pSerEvent
    [ out ] The event for the passed back serialization. Member elParamType must not be SPET_LPARAM_IS_OBJECT.

Return Values

None, however member SerializedlParam is set to the size of the serialized structure.

Copies an existing event instance and then serializes the new instance.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT Serialize(</strong> <strong>T</strong> **<em>ppCoMemSerEvent</em>, <strong>ULONG</strong> *<em>pcbSerEvent</em> <strong>);</strong></pre>

Parameters

  • ppCoMemSerEvent
    [ out ] The event for the passed back serialization. It is allocated and serialized. When no longer required, it must be manually freed with CoTaskMemFree().
  • pcbSerEvent
    [ out ] The number of bytes allocated for the serialization. On an error, it will be zero.

Return Values

Value Description
S_OK Serialization completed successfully.
E_OUTOFMEMORY Exceeded available memory.