Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!apple!anderson From: anderson@Apple.COM (Clark Anderson) Newsgroups: comp.sys.mac.programmer Subject: Re: FSRead() limit on number of bytes Message-ID: <43882@apple.Apple.COM> Date: 12 Aug 90 03:48:16 GMT References: <1335@anaxagoras.ils.nwu.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 27 From: sandell@ils.nwu.edu (Greg Sandell) Subject: FSRead() limit on number of bytes >Using FSRead() I find that I can read only a limited number of >bytes at a time. In the code below byteCount can be as large >as 1500 but when I use a value of 2000 the program dies a strange >death.... I'm not clear on what buffer you're putting the data INTO when you read it. You need to allocate a buffer of some kind (array, record (struct), or something), and it needs to be large enough to hold the data. The last parameter of FSRead is a pointer (or address) of the beginning of the buffer you want the data to go into. I've used FSRead for larger block of data than 2000 bytes with no problem. You might check the byteCount parameter right after you do the read. It will contain the actual number of bytes that were read. Hope that helps... --clark -- ----------------------------------------------------------- Clark Anderson InterNet: anderson@apple.com PCB Software Tools AppleLink: C.ANDERSON Apple Computer, Inc BellNet: 408-974-4593 "I speak only for myself, much to my employer's relief..." -----------------------------------------------------------