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