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.
ClearCommError (kernel32)
.
C# Signature:
[DllImport("kernel32.dll")]
private static extern bool ClearCommError(
[In] IntPtr hFile, // not int, convert int to IntPtr: new IntPtr(12)
[Out, Optional] out uint lpErrors,
[Out, Optional] out COMSTAT lpStat
[In] int hFile,
[Out, Optional] uint lpErrors,
[In, Out, Optional] ref COMSTAT lpStat
);
COMSTAT stats = new COMSTAT();
uint flags = 0;
ClearCommError(hComm, out flags, out stats);
ClearCommError(hComm, 0, ref stats);
will get you the statistics of the com port passed with hComm.
Alternative Managed API:
Do you know one? Please contribute it!
The ClearCommError API
4/11/2014 4:32:55 AM - gibwar@gibixonline.com-67.42.187.10
The COMSTAT structure contains information about a communications device. This structure is filled by the ClearCommError (kernel32) function.
4/15/2011 3:25:09 PM - -84.73.85.109
Please edit this page!
Do you have...
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).