Trouble with Serial programming in NT
-
I need to address the Serial (COM1) port on NT kernel based systems (NT4 and Win2k). I read the articles in the system section, but they don't seem to cover what I'm looking for. As I want to address some hardware I made myself, I need to have full control. I.E: I must be able to put DTR on high or low at will. The articles here assume baut-rate based comminucations are the way to go. I'd rather not use the DDK, I don't even have it. Suggestions? Ideas? I'm thinking about using the MSCOMM32 ActiveX control, but I'm not too happy with it. I've been looking into ::CreateFile. I can open the com port without trouble, but there isn't functionality for directly reading and writing to the port. Please help me out, thanks in advance and kind regards, Griffith
Everything you say will be misquoted, ripped out of context and used against you.
-
I need to address the Serial (COM1) port on NT kernel based systems (NT4 and Win2k). I read the articles in the system section, but they don't seem to cover what I'm looking for. As I want to address some hardware I made myself, I need to have full control. I.E: I must be able to put DTR on high or low at will. The articles here assume baut-rate based comminucations are the way to go. I'd rather not use the DDK, I don't even have it. Suggestions? Ideas? I'm thinking about using the MSCOMM32 ActiveX control, but I'm not too happy with it. I've been looking into ::CreateFile. I can open the com port without trouble, but there isn't functionality for directly reading and writing to the port. Please help me out, thanks in advance and kind regards, Griffith
Everything you say will be misquoted, ripped out of context and used against you.
After you've opened the port with ::CreateFile you can use ::WriteFile to write to the port. Use ::SetCommState to control the DTR/RTS lines, the baud rate and parity settings via the DCB structure. If a train station is where the train stops, what's a workstation...?
-
After you've opened the port with ::CreateFile you can use ::WriteFile to write to the port. Use ::SetCommState to control the DTR/RTS lines, the baud rate and parity settings via the DCB structure. If a train station is where the train stops, what's a workstation...?
Thanks a lot!
Everything you say will be misquoted, ripped out of context and used against you.