KamalKumar
Industrial
- Aug 23, 2003
- 2
Hi all,
I wrote an assembly language program four years back in Win 95/98.It also works on ME.But now my client wants it NT/XP compatible.Everything works fine except reading the com port.My problem is this-no matter how many bytes I tell the function ReadFile to read,it reads only 258 bytes(the same function reads faithfully in Win98).Not only that it filters few binary characters like 0dH(i.e.,LF,CR) How can I read correctly and more than this in NT?Comm timeouts are zero.
Typical port reading-
mov dword ptr[ol.hEvent],0
mov dword ptrytes_To_Read],1024
mov dword ptr[ol.Offset],0
mov dword ptr[ol.OffsetHigh],0
push offset ol
push offset Bytes_Read
push [Bytes_To_Read]
push offset ReadBuffer
push [hCom]
call ReadFile
Cmp eax,0
jne Noerror
Call GetLastError
;->here I put in Microsoft suggested GetOverlapped result
;to wait till port reading is complete.
Any suggetions as what is missing??
Thanks in advance.
I wrote an assembly language program four years back in Win 95/98.It also works on ME.But now my client wants it NT/XP compatible.Everything works fine except reading the com port.My problem is this-no matter how many bytes I tell the function ReadFile to read,it reads only 258 bytes(the same function reads faithfully in Win98).Not only that it filters few binary characters like 0dH(i.e.,LF,CR) How can I read correctly and more than this in NT?Comm timeouts are zero.
Typical port reading-
mov dword ptr[ol.hEvent],0
mov dword ptrytes_To_Read],1024
mov dword ptr[ol.Offset],0
mov dword ptr[ol.OffsetHigh],0
push offset ol
push offset Bytes_Read
push [Bytes_To_Read]
push offset ReadBuffer
push [hCom]
call ReadFile
Cmp eax,0
jne Noerror
Call GetLastError
;->here I put in Microsoft suggested GetOverlapped result
;to wait till port reading is complete.
Any suggetions as what is missing??
Thanks in advance.