General information
Category:
Windows API functions
When the port is open you must call ReadFile & WriteFile for read and write data the in COM port.
---------------------------------------
Declare Long ReadFile in "kernel32" Long hFile , STRING @lpBuffer, Long nNumberOfBytesToRead, Long @lpNumberOfBytesRead, long lpOverlapped
LOCAL hPort,lpNumberOfBytesRead, lpBuffer
lpNumberOfBytesRead = 50
lpBuffer = SPACE(50)
hPort = CreateFile (lcPort, GENERIC_READ, 0,0,;
OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0)
ReadFile( hPort, @lpBuffer, 50, @lpNumberOfBytesRead, 0 )
IDEM for WriteFile function.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only