private static extern int presage_new( callback_get_past_stream_t cb_get_past_stream, IntPtr cb_get_past_stream_arg, callback_get_future_stream_t cb_get_future_stream, IntPtr cb_get_future_stream_arg, out IntPtr result );
public Presage( callback_get_past_stream_t get_past_stream_cb, callback_get_future_stream_t get_future_stream_cb, string config ) { // ensure that delegate lifetime persists as long as presage object this.get_past_stream_cb = get_past_stream_cb; this.get_future_stream_cb = get_future_stream_cb; set_presage_dll_directory(); // call presage_new_with_config try { int rc = presage_new_with_config( get_past_stream_cb, System.IntPtr.Zero, get_future_stream_cb, System.IntPtr.Zero, config, out prsg); if (rc != 0) { throw new PresageException(String.Format("presage_new_with_config() error code: {0}", rc)); } } catch (Exception) { } }
private static extern int presage_new_with_config( callback_get_past_stream_t cb_get_past_stream, IntPtr cb_get_past_stream_arg, callback_get_future_stream_t cb_get_future_stream, IntPtr cb_get_future_stream_arg, string config, out IntPtr result );