using System.Runtime.InteropServices; namespace Whisper.Internal { /// Unmanaged code calls this to check for cancellation [UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate int pfnShouldCancel( IntPtr pv ); /// Unmanaged code calls this to notify about the status [UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate int pfnCaptureStatus( IntPtr pv, eCaptureStatus status ); /// Capture callbacks for unmanaged code public struct sCaptureCallbacks { /// Cancellation function pointer public pfnShouldCancel shouldCancel; /// Capture status function pointer public pfnCaptureStatus captureStatus; /// COntext pointer, only needed for C++ compatibility public IntPtr pv; } }