Solved

what is the value for IOCTL_SERIAL_GET_COMMSTATUS

Posted on 2011-03-22
5
565 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 75

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

16 Experts available now in Live!

Get 1:1 Help Now