Hello! i'm using the updated library for 64bits modCOMM - Written by: David M. Hitchner but i can't send data for serial port. The writefile() function returns zero all the time.
Below I copy the entry to the function. The readfile function is very similar, but it works fine. Please if anyone can help me I would appreciate it.
------------------- here the code-------------
Public Function CommWrite(intPortID As Integer, strData As String) As Long
Dim i As Integer
Dim lngStatus As Long, lngSize As Long
Dim lngWrSize As Long, lngWrStatus As Long
On Error GoTo Routine_Error ' Get the length of the data. lngSize = Len(strData) ' Output the data. lngWrStatus = WriteFile(udtPorts(intPortID).lngHandle, strData, lngSize, _ lngWrSize, udtCommOverlap) ' Note that normally the following code will not execute because the driver ' caches write operations. Small I/O requests (up to several thousand bytes) ' will normally be accepted immediately and WriteFile will return true even ' though an overlapped operation was specified. DoEvents If lngWrStatus = 0 Then lngStatus = GetLastError