Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
[StructLayout(LayoutKind.Sequential)]
internal struct DCB
{
public Int32 DCBLength;
public Int32 BaudRate;
public Int32 fBitField;
public Int16 wReserved;
public Int16 XonLim;
public Int16 XoffLim;
public Byte ByteSize;
public Byte Parity;
public Byte StopBits;
public Char XonChar;
public Char XoffChar;
public Char ErrorChar;
public Char EofChar;
public Char EvtChar;
public Int32 wReserved1;
}
Alternative Managed API:
Do you know one? Please contribute it!
[StructLayout(LayoutKind.Sequential)]
internal struct COMMCONFIG
{
public Int32 dwSize;
public Int16 wVersion;
public Int16 wReserved;
public DCB dcb;
public Int32 dwProviderSubType;
public Int32 dwProviderOffset;
public Int32 dwProviderSize;
public string wcProviderData;
}
private void ScanCommPorts(int maxComPortNumber)
{
COMMCONFIG cc = new COMMCONFIG();
uint sz = (uint)Marshal.SizeOf(cc);
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).