public unsafe void GetCommProperties()
 {
     using (SafeFileHandle handle = Communications.CreateComPortFileHandle(@"\\.\COM4"))
     {
         CommunicationsProperties properties = Communications.GetCommunicationsProperties(handle);
     }
 }
示例#2
0
 public static extern bool GetCommProperties(
     SafeFileHandle hFile,
     out CommunicationsProperties lpCommProp);