public unsafe void GetCommProperties()
 {
     using (SafeFileHandle handle = Communications.CreateComPortFileHandle(@"\\.\COM4"))
     {
         CommunicationsProperties properties = Communications.GetCommunicationsProperties(handle);
     }
 }