Re: [Dev-C++] as I capture and he/she sends data in the serial and parallel ports in windows xp
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-03-03 21:10:38
|
For serial communication, just use some or more of the following:
CreateFile()
CloseHandle()
ReadFile()
ReadFileEx()
WriteFile()
WriteFileEx()
DCB - device control block
GetCommState()
SetCommState()
BuildCommDCB()
GetCommProperties()
SetupComm()
COMMCONFIG
GetCommConfig()
SetCommConfig()
GetDefaultCommConfig()
SetDefaultCommConfig()
CommConfigDialog()
TransmitCommChar()
PurgeComm() // clear input or output buffer
FlushFileBuffers() // wait for pending output to be sent
COMMTIMEOUTS
GetCommTimeouts()
SetCommTimeouts()
SetCommBreak()
ClearCommError()
EV_BREAK - break detected on input
EV_CTS - CTS changed state
EV_DSR
EV_ERR - line status error (CE_FRAME,CE_OVERRRUN,CE_RXPARITY)
EV_RING
EV_RLSD - receive-line-signal-detect changed state
EV_RXCHAR
EV_RXFLAG - the event character was received (DCB+SetCommState)
EV_TXEMPTY
WaitCommEvent()
SetCommMask()
GetCommModemStatus()
CreateFile(_T("\\.\com1")
/Per W
On Mon, 3 Mar 2003, jo mateix wrote:
> Hello,
> I've rearranged your post, so that others can understand it:
>
>
> >From: "jose" <fac...@ho...>
> >To: <dev...@li...>
> >Subject: [Dev-C++] as I capture and he/she sends data in the serial and
> >parallel ports in windows xp
> >Date: Sun, 2 Mar 2003 15:23:19 -0500
> >
> >Does anybody know how I can design a program in dev-c to capture data in
> >the serial port, in the parallel port and if it is possible in USB, for
> >windows xp professional? , he/she would thank any information.
>
> Well, C & C++ don't support built-in port manipulation, as it is system
> dependant. For example, code written for Unix didn't be portable to Windows.
> The right thing to do is to use the API required by your target system, or
> some cross-platform tool, such as xwindows... Sorry, I can't give you better
> advice. I'm not a experienced programmer.
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|