Thread: PRS-500 Reader internals
View Single Post
Old 10-17-2006, 03:36 AM   #40
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Quote:
Originally Posted by geekraver
Couple of questions about this:

1) is the size that gets passed through for the read data just for the extra stuff; i.e. for FileOpen it would be "sizeof(FileOpenAnswer) - 16"?
Request.extralen is the size of data following the header. "answersize" is how much data you expect to get in the answer. For FileOpen: extralen=4+nPathLen, answersize = 4. (and you should get 4 in Answer.dataLen).
Quote:
Originally Posted by geekraver
2) Should the "Answer* answer" arg in UsbReceiveProc actually be "Answer** answer", i.e. something like:
Yes, it fills in the pointer which you'll need to free.
igorsk is offline   Reply With Quote