IOW24 & windows versions

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
bavw
Posts: 2
Joined: Wed Feb 15, 2006 4:42 pm

IOW24 & windows versions

Post by bavw »

Hello,

I have build a Delphi-5 application using the hid-component to access a IIC-memory device. Under winXP everything works fine, reading as well as writing from/to the memory device.

The problem arises when using the same application on win2K(SP4) or win98.
Writing to the memory device works ok, but reading results in errors. When reading the 4th report (readfile) the call to ReadFile does not return....
Could this be a problem in the Hid component, the IOW24 or else where in the application ?

Can you give me a hint where to look for the solution ?

thanks in advance

I'have included some source code with debug lines



while ReadResult and // last read result
(TotalRead < Count) and // all bytes read ?
((RxReport.Bytes[0] and $80) =0) and // IIC read errors ?
((RxReport.Bytes[0] and $07) >= 6) do begin // more bytes to read ?
showmessage(' start read: ' +IntToStr(TotalRead));
ReadResult:= ReadFile(RxReport, sizeof(RxReport) ,BytesRead); // read result (ack/nack response)
showmessage(' read ready: ' +IntToStr(TotalRead));
if ReadResult and ((RxReport.Bytes[0] and $80) = 0) then begin // IIC read errors ?
for n:= 0 to (RxReport.Bytes[0] and $07)-1 do // no: copy bytes read to buffer
Byte(Buffer[TotalRead+n]):= RxReport.Bytes[n+1];
inc(TotalRead,n);
end;//if
end;//while
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

W2K has a problem with requests that result in more than 2 reports getting returned. For some reason it loses some reports.

So when running on W2K you should make sure that you do not use IIC read commands that return more than 2 reports.
bavw
Posts: 2
Joined: Wed Feb 15, 2006 4:42 pm

Post by bavw »

Guido,


thanks for the fast reaction.


Does this mean that when i rebuild my application and try using the dll instead I can expect the same results ?


regards,
Bas
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

Yes, it is a W2K problem, not a problem with the IO-Warrior or its software.
Post Reply