Solved

what is the value for IOCTL_SERIAL_GET_COMMSTATUS

Posted on 2011-03-22
5
557 Views
Last Modified: 2013-12-17
I am trying to make a call using this value but am unable to find the number for this or the reference I would need to put in to the "using" clause so my program would know what it is.

Are these values listed anywhere?
0
Comment
Question by:jetbet
  • 3
5 Comments
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 35194974
According to this file, is a macro function.
0
 

Author Comment

by:jetbet
ID: 35195496
Do you know how I could use the following code to clear any pending communication errors?
C# Signature:

[DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true, CharSet = CharSet.Auto)]
static extern bool DeviceIoControl(IntPtr hDevice, uint dwIoControlCode,
IntPtr lpInBuffer, uint nInBufferSize,
IntPtr lpOutBuffer, uint nOutBufferSize,
out uint lpBytesReturned, IntPtr lpOverlapped);

Open in new window

0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 35195626
0
 

Author Comment

by:jetbet
ID: 35202131
That looks good although when I run the code the comm port cannot be opened as (according to getlasterror) "The system cannot find the file specified".

This may be due to using a usb to serial adaptor.

I will leave this question open for another day while I try and find the solution to this, and then assign the points to you.
0
 

Author Closing Comment

by:jetbet
ID: 35286626
Thanks for your help. It seams OK if you only use Com1
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now