I need to read(write) bytes from(into) a serial port in windows (need to connect 2 comps).
Can some 1 give examples for:
1. read a byte into comx
2. write a byte into comx
3. check if a byte in comx is availible
4. Initialise a port
(something like bios int 14H in dos mode)
or are there any functions availible in windows ? (where to find/documentation, examples etc.)
I write a prog. in Visual Basic 5.0 Learning Edition (doesent allow MSComm32.ocx :( ),
so i have to make a dll with NASM).
Can i write(read) bytes directly into 3f8-3ff (com1) ?
hope some 1 can help , thx
Can some 1 give examples for:
1. read a byte into comx
2. write a byte into comx
3. check if a byte in comx is availible
4. Initialise a port
(something like bios int 14H in dos mode)
or are there any functions availible in windows ? (where to find/documentation, examples etc.)
I write a prog. in Visual Basic 5.0 Learning Edition (doesent allow MSComm32.ocx :( ),
so i have to make a dll with NASM).
Can i write(read) bytes directly into 3f8-3ff (com1) ?
hope some 1 can help , thx
The serial ports are accesed like files.
That means: call CreateFile
The name of the file to open should be like "\\.\COM2"
I "think", though Ive never played with it myself.
But check out
http://msdn.microsoft.com
search for createfile, more info...
That means: call CreateFile
The name of the file to open should be like "\\.\COM2"
I "think", though Ive never played with it myself.
But check out
http://msdn.microsoft.com
search for createfile, more info...
The filename can be "COM2" without \\.\
You should read the MSDN
You should read the MSDN