> Each HANDLE maintains its own file position. Writing to one won't
> move
[quoted text clipped - 5 lines]
> a sequence of partial writes you could end up with part of each
> array.
>> Each HANDLE maintains its own file position. Writing to one won't move
>> the other one forward, so one array will end up written on top of the
[quoted text clipped - 6 lines]
> I guess that I should have tested what I wanted - that would be the
> quickest way to tease out the answer. Anyway, let me explain that I'm
That would have a race condition, so you might not actually get the right
answer.
> talking here about accessing HID device as a file. Does it change
> anything?
Well, you should test whether you can open multiple handles at once. Some
devices can't be opened multiple times regardless of sharing options. After
that, everything depends on the driver.
A n g l e r - 18 Aug 2007 02:39 GMT
> Well, you should test whether you can open multiple handles at once.
> Some devices can't be opened multiple times regardless of sharing
> options. After that, everything depends on the driver.
Can be opened multiple times coz I designed it this way. Anyway,
methinks this is gonna be races there - it's just a mater whether
amongst order of two (more) arriving packets, or their bytes as well.
Will have to take care of this and use mutexes in a dll designed to
access this.
Cheers,
P.