|
-
July 19th, 1999, 09:09 PM
#1
Serial Port Communication (NT)
I'm using VC 6.0++ and Windows NT 4.0. I have to implement a serial
port communication with the following requirements:
- Port initialization: baudrate, parity, etc.
- Writing to port: I have to write strings to the port.
- Receiving from the port: I have to receive strings from the port.
Single characters would be ok as well. It has to be done with polling
and not with messaging, which also should be easier. Is there a buffer I
can read from? If yes, is it also possible to clear that buffer?
I want to write my own class with these three methods. It would be great
if somebody could give me some help, because I'm not that experienced in
this.
Thanks a lot
Daniel
-
July 20th, 1999, 01:03 AM
#2
Re: Serial Port Communication (NT)
Hi,
Do you have to implement a specific protocol?
I have the same problem, but my communication builds on a protocol (3964R from Siemens), so I prefer to use a tool because then I don't have to care about handshake and all this stuff.
-
July 20th, 1999, 03:26 AM
#3
Re: Serial Port Communication (NT)
-
July 20th, 1999, 08:22 AM
#4
Re: Serial Port Communication (NT)
I don't have to implement a certain protocol. I just have to read strings to the port and to write strings from the port.
Gruesse nach Deutschland
Daniel
-
July 20th, 1999, 08:36 AM
#5
Re: Serial Port Communication (NT)
Oh,
If you want to use standard classes, I think I'm not able to tell you anything new that you don't know alreay.
Good luck!
-
July 23rd, 1999, 11:14 AM
#6
Re: Serial Port Communication (NT)
1. CreateFile( "COMx", ..... ).
2. SetupComm( ... )
3. WaitForCommEvent(...)
4. ReadFile(...)
5. CloseHandle(...)
Any question ? Write to me [email protected] ! I have more own examples.
Eugene.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|