|
-
March 31st, 2003, 05:11 AM
#1
receiving data from lpt1?
Hi,
some printer ESC-sequences produce an answer giving back some bytes, for example when I want to check the status of a paper sensor. But how can I read this? I do the communication with CreateFile and WriteFile. But a subsequent ReadFile always reads 0 bytes.
Any ideas?
Thanks,
Christian.
-
March 31st, 2003, 05:30 AM
#2
Are you using overlapped i/o? Is FILE_FLAG_OVERLAPPED specified while you are opening port?
If no, try it. It should solve problem. But don't forget that in this case ReadFile() will return immediately and system performs read by itself. You can determine when reading process is finished by using the GetOverlappedResult() function.
With best wishes, Alexander Hritonenkov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|