🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12755

Re: WriteFile(to COM1)

#12755
From: Remy Lebeau (TeamB)
Date: Thu, 20 Nov 2003 05:08
20 lines
1526 bytes
"Nicholas Gessler" <gessler@ucla.edu> wrote in message
news:3fbc3e97$1@newsgroups.borland.com...


> This code works:

You could create a separate buffer first, and then send the buffer after you
set it up, ie:

    char buffer[3];
    buffer[0] = 'w';
    buffer[1] = (char)((phase[motor] + 2) % 4) + (motor * 4);
    buffer[2] = '\x0';

    // Coil Off
    WriteFile(hComm, buffer, 3, &dwWritten, NULL);


Gambit
Technical Details
Message-ID: <3fbc4b68@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fbc160d$1@newsgroups.borland.com> <3fbc1f3c@newsgroups.borland.com> <3fbc2c5f$1@newsgroups.borland.com> <3fbc2e31$1@newsgroups.borland.com> <3fbc3e97$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,bcf3c83168a0fa3a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-19 21:09:20 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fbc160d$1@newsgroups.borland.com> <3fbc1f3c@newsgroups.borland.com> <3fbc2c5f$1@newsgroups.borland.com> <3fbc2e31$1@newsgroups.borland.com> <3fbc3e97$1@newsgroups.borland.com>
Subject: Re: WriteFile(to COM1)
Date: Wed, 19 Nov 2003 21:08:30 -0800
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.137.149
Message-ID: <3fbc4b68@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069304680 67.22.137.149 (19 Nov 2003 21:04:40 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail