public static PaHostErrorInfo PA_GetLastHostErrorInfo() { IntPtr ptr = PA_GetLastHostErrorInfoPtr(); PaHostErrorInfo info = (PaHostErrorInfo)Marshal.PtrToStructure(ptr, typeof(PaHostErrorInfo)); return(info); }
public static HostErrorInfo FromNative(IntPtr ptr) { PaHostErrorInfo native = Marshal.PtrToStructure <PaHostErrorInfo>(ptr); HostErrorInfo managed = new HostErrorInfo(); managed.HostApiType = (HostApiTypeId)native.hostApiType; managed.ErrorCode = native.errorCode; managed.ErrorText = Marshal.PtrToStringAnsi(native.errorText); return(managed); }
public PortAudioException(PaHostErrorInfo info) : this(info.errorText) { }