kc0fcp wrote: > This code does not work. b_read is always zero, and nothing is read > from the stream: > > var > pbProg : array of byte; > cbProgram : longword; > <...snip...> > Setlength(pbProg, bkhdr.cbProgram); > b_read := sS.read( pbProg, bkhdr.cbProgram );
That reads cpProgram bytes into the four-byte array variable. You need to read into the array's contents instead: ss.Read(pbProg[0], cbProgram); (Note that when you write it like that, it will always work, no matter whether the array is dynamic or static.) -- Rob ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

