17.08.2019

Vb6 Serial Port Without Mscomm

Vb6 Serial Port Without Mscomm Rating: 6,6/10 5793 votes
Hi.I'm tryng to write a code to control my serial COM port using the <CreateFile> function of Kernel32.dll. I've almost found everything I need i.r. SetCommTimeouts parms) but I'm still having problem trying to replicate the instruction SERIAL_SET_HANDFLOW.
Monitoring another software using PortMon, I get the following line [Shake:1 Replace:40 XonLimit:256 XoffLimit:256]
Considering that XonLim and XoffLim are member of DCB structure, I was expecting to find <Shake> and <Replace> members in the same structure too. No way. Digging internet with google didn't give me any help. Do I looking for wrong arguments? Is anybody around able to help me, please? I need to change <Shake> to 9 and <Replace> to 80.
  1. Vb6 Serial Port Without Mscomm Password
Vb6Vb6 serial port mscomm

Vb6 Serial Port Without Mscomm Password

' Wait for data to come back to the serial port. Do DoEvents Buffer$ = Buffer$ & MSComm1.Input Loop Until InStr(Buffer$, 'OK' & vbCRLF) ' Read the 'OK' response data in the serial port. ' Close the serial port. MSComm1.PortOpen = False End Sub Note The MSComm control can use polling or an event-driven method to retrieve data from the port.