Search
Closed
as Won't Fix Help for as Won't Fix

0
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 490686
Opened: 9/18/2009 4:02:57 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I'm aware this may not be the best place to report this bug, however
I was unable to find a bug report form for IO issues. Perhaps one of
You could be kind enough to forward this to the right people.

ReadFile does not honor the Offset field of the OVERLAPPED structure,
it just reads straight to offset zero in the buffer.

This occurs on WinXP/SP2, when reading from a serial port.
Presently I don't have resources to verify this is a problem in
ReadFile, and not in an underlying IO driver, but surely You do ;-)

I attach a small (very early alpha) app that exhibits the error.
The rar file contains the whole VC6 workspace and source.
The app will be used to capture debug strings from a virtual machine
running on VMware Server 2, via a 'com0com' virtual null modem.
Details (expand)

Technology

Other (This may not be the best place to report issues...)
Repro Steps
* Modify the COM port name for your workstation.
* Build and start the app in the VC6 IDE.

* Enable a breakpoint that catch incomplete
strings in the comm monitor thread.

* Supply the app's COM port with a block of data
containing several \n terminated strings plus
a final string cut off in the middle somewhere.
An easy way is to use 'com0com' available at SourceForge.

* When the incomplete string is captured, notice the Offset
in the OVERLAPPED struct, where the continuation of the
incomplete string should be read in.

* Supply the COM port with the next string block, beginning
with the remainder of previous incomplete string.

* Notice that when ReadFile or GetQueuedCompletionStatus
returns, the data har been read in at offset zero in
the buffer, not the Offset specified in OVERLAPPED.

The error is also exhibited when using GetOverlappedResult
instead of an IO completion port. The utility is early alpha
so it's ill mannered and doesn't cleanup after itself, etc.

Operating System

Windows XP
File Attachments
1 attachments
ComMon.rar
Sign in to post a comment.
Posted by Mr.Love on 10/20/2009 at 5:24 AM
I should not be surprised that you won't fix your bugs.
I have a long list of Windows bugs thet's been around
for more than ten years and still havent been fixed.
Just change the specification instead, huh ?
You'll find it hard to get rid of OVERLAPPED I think.
Your software quality seem to be on
a downward slope :-/