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
IOW24 & windows versions
Moderator: Guido Körber
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact:
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact: