error Incorrect Function
-
Hi there, I'm trying to do overlapped IO on the serial port, but since I changed from non-overlapped the readfile and writefile calls fail with error
incorrect function
I changed the followingm_ComPortHndl = CreateFile (sComPort,GENERIC_READ|GENERIC_WRITE,0,
NULL,OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,NULL);i.e. added the file flag overlapped and also added overlapped structures to the read/write calls
ReadFile( m_ComPortHndl, &nData, 1, &dwBytesRead, &ovRead)
any ideas why I might be getting this?? Andy
-
Hi there, I'm trying to do overlapped IO on the serial port, but since I changed from non-overlapped the readfile and writefile calls fail with error
incorrect function
I changed the followingm_ComPortHndl = CreateFile (sComPort,GENERIC_READ|GENERIC_WRITE,0,
NULL,OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,NULL);i.e. added the file flag overlapped and also added overlapped structures to the read/write calls
ReadFile( m_ComPortHndl, &nData, 1, &dwBytesRead, &ovRead)
any ideas why I might be getting this?? Andy