On Sat, Aug 15, 2009 at 3:04 PM, Paul Herring<[email protected]> wrote:
>
> Have you tried simply
>
> this->hSerial = CreateFile("COM3", ....

Addendum: http://msdn.microsoft.com/en-us/library/aa363858%28VS.85%29.aspx
has this to say on the matter:

Communications Resources

The CreateFile function can create a handle to a communications
resource, such as the serial port COM1. For communications resources,
the dwCreationDisposition parameter must be OPEN_EXISTING, the
dwShareMode parameter must be zero (exclusive access), and the
hTemplateFile parameter must be NULL. Read, write, or read/write
access can be specified, and the handle can be opened for overlapped
I/O.

To specify a COM port number greater than 9, use the following syntax:
"\\.\COM10". This syntax works for all port numbers and hardware that
allows COM port numbers to be specified.

For more information about communications, see
<http://msdn.microsoft.com/en-us/library/aa363196%28VS.85%29.aspx>.

-- 
PJH

http://shabbleland.myminicity.com/com
http://www.chavgangs.com/register.php?referer=9375

Reply via email to