/// <summary> /// Sets the callback function for the specified cExternalMessageInterface component instance. /// The function will get called whenever the component receives a message. /// </summary> /// <param name="componentName">Instance name of the cExternalMessageInterface component for which to set the callback.</param> /// <exception cref="ObjectDisposedException"> /// Thrown if the object has already been disposed. /// </exception> /// <exception cref="InvalidOperationException"> /// Thrown if openSMILE has not been initialized yet. /// </exception> /// <exception cref="OpenSmileException"> /// Thrown for internal openSMILE errors. /// </exception> public void ExternalMessageInterfaceSetCallback(string componentName, ExternalMessageInterfaceCallback callback) { if (disposed) { throw new ObjectDisposedException(typeof(OpenSMILE).FullName); } if (smileObj == IntPtr.Zero) { throw new InvalidOperationException("openSMILE must be initialized first."); } CheckSmileResult(OpenSmileApi.Smile_extmsginterface_set_msg_callback(smileObj, componentName, callback, IntPtr.Zero)); }
public static extern OpenSmileResult Smile_extmsginterface_set_msg_callback(IntPtr smileobj, string componentName, ExternalMessageInterfaceCallback callback, IntPtr param);