Migrated to CsWin32 #1
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -34,3 +34,4 @@ _ReSharper*/
 | 
			
		||||
/.tmp
 | 
			
		||||
*.DotSettings
 | 
			
		||||
/misc
 | 
			
		||||
/.idea
 | 
			
		||||
 
 | 
			
		||||
@@ -317,11 +317,9 @@ public partial class SerialPort : IDisposable
 | 
			
		||||
    /// <returns>Modem status object</returns>
 | 
			
		||||
    protected ModemStatus GetModemStatus()
 | 
			
		||||
    {
 | 
			
		||||
        uint f;
 | 
			
		||||
 | 
			
		||||
        CheckOnline();
 | 
			
		||||
        if (!Win32Com.GetCommModemStatus(_hPort.DangerousGetHandle(), out f)) ThrowException("Unexpected failure");
 | 
			
		||||
        return new ModemStatus(f);
 | 
			
		||||
        if (!Win32Com.GetCommModemStatus(_hPort.DangerousGetHandle(), out var f)) ThrowException("Unexpected failure");
 | 
			
		||||
        return new ModemStatus((MODEM_STATUS_FLAGS)f);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
@@ -497,7 +495,7 @@ public partial class SerialPort : IDisposable
 | 
			
		||||
                    uint f;
 | 
			
		||||
                    if (!Win32Com.GetCommModemStatus(_hPort.DangerousGetHandle(), out f))
 | 
			
		||||
                        throw new CommPortException("IO Error [005]");
 | 
			
		||||
                    OnStatusChange(new ModemStatus(i), new ModemStatus(f));
 | 
			
		||||
                    OnStatusChange(new ModemStatus((MODEM_STATUS_FLAGS)i), new ModemStatus((MODEM_STATUS_FLAGS)f));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user