Re: BlockRead/BlockWrite problem Programming Software Development by Micheus … a look in this sample from Delphi help file to Blockread function: [CODE='delphi']var FromF, ToF: file; NumRead, NumWritten: … } Canvas.TextOut(10, 10, 'Copying ' + IntToStr(FileSize(FromF)) + ' bytes...'); repeat BlockRead(FromF, Buf, SizeOf(Buf), NumRead); BlockWrite(ToF, Buf, NumRead, NumWritten… Re: BlockRead is not returning all values Programming Software Development by SeaZoneDev Thanks tried that by doing BlockRead(ReadBIP,RecTile,SizeOf(recTile)-1,iRead); and that didn't … := (((iRow)*(360 Div iBinSize)) + iCol)* SizeOf(RecTile); Seek(ReadBIP,iSeek); BlockRead(ReadBIP,RecTile,SizeOf(recTile)+1,iRead); // MessageDlg(RecTile.sTileName,mtInformation… Re: BlockRead is not returning all values Programming Software Development by pritaeas In addition to LizR This: BlockRead(ReadBIP,RecTile,SizeOf(recTile)+1,iRead); Should be this: BlockRead(ReadBIP,RecTile,1,iRead); BlockRead/BlockWrite problem Programming Software Development by Thew ….Lines[i]); Reset(streamFile); while not Eof(streamFile) do begin BlockRead(streamFile,Buffer,1); BlockWrite(myFile,Buffer,1); end; CloseFile(streamFile… BlockRead is not returning all values Programming Software Development by SeaZoneDev …; END; iSeek := 0 //read the first record Seek(ReadBIP,iSeek); BlockRead(ReadBIP,RecTile,SizeOf(recTile),iRead); [/code] When it runs it… Re: BlockRead is not returning all values Programming Software Development by pritaeas Shouldn't you be using iCount instead of SizeOf(recTile) in the BlockRead ? how to use AssignFile, Reset, FileSize, BlockRead, CloseFile on C++ Builder?? Programming Software Development by chotib hi, i want to ask using AssignFile, Reset, FileSize, BlockRead, CloseFile on c++ builder (codegear 2009) ?? [CODE]system.AssignFile(objfile,…;FileName); system.Reset(objfile,1); FSize=system.FileSize(objfile); system.BlockRead(objfile,Buf,SizeOf(Buf),NumRead); system.CloseFile(objfile);[/CODE] and… Dynamic array and BlockRead malfunction? Programming Software Development by hanzo2001 …); view_triangle(ts[0]); readln; //SHOWS "(0, 0, 0)" blockread(src,ts,size,numRead); view_triangle(ts[0]); readln; //EXIT CODE…'t understand why the array elements are unaccesible AFTER the BLOCKREAD. The docs are clear, the array is dynamic, SRC is… Re: Dynamic array and BlockRead malfunction? Programming Software Development by pritaeas …. It may be possible to pass `ts[0]` to the blockread though (`ts` is a pointer, `ts[0]` points to the… at a time so you can use `ts[i]` in blockread, or use an old fashioned hack with a static array.) Saving and recording data Programming Software Development by DelphiGuy … it wipes the data of the counter variables after calling BlockRead, which tells me how many arrays were made and how… Encryption and Decryption Programming Software Development by Ben Ashton …,1);{ Create output file } while not(eof(f_in)) do begin blockread(f_in,buffer,16384,bytes_read); { Read a chunk for input file… Re: After finishing the 1st part, I still have many problem of this question. Programming Software Development by FlamingClaw … the pascal language. You have to use the [b]BlockRead [/b]and [b]BlockWrite[/b] procedures. See after …a variable. Unit System Category IO routines Delphi syntax: procedure BlockRead(var F: File; var Buf; Count: Integer [; var…and AmtTransferred is an optional variable of type Integer. BlockRead reads Count or fewer records from the file F… Re: Write Array of records to a file Programming Software Development by cucolino …/software-development/pascal-and-delphi/threads/438574/dynamic-array-and-blockread-malfunction), but I've read something more similar in [this… out so far is, that I might be missing the blockread..? But I'm not sure if that's the case… Re: create hidden web browser control Programming Software Development by Teme64 … IsNot Nothing Then CharSet = WebResp.CharacterSet WebResp.ToString() ' TODO: use BlockRead and MAX load size to avoid overflow PageHTML = WebReader.ReadToEnd… Re: Please help me in this part of the question. Programming Software Development by FlamingClaw ….I wrote to you that you have to use the blockread and blockwrite commands.When I'm learning more about the… Re: BlockRead/BlockWrite problem Programming Software Development by Thew Thank you Micheus, I've used this help you posted to another file function FileWrite and FileRead ad it works great. Re: BlockRead is not returning all values Programming Software Development by LizR Wouldnt this be easier with a stream? anyway.. your while look of eof hasnt made much sense in this case, as when writing you dont normally test for eof... when you blockwrite, the params are file,buffer,count, result Your count doesnt get a value it should read something like BlockWrite(BIP,TileRec,1,itransfer); If you know its only 1 … Re: BlockRead is not returning all values Programming Software Development by LizR Which is what I wrote :P Re: BlockRead is not returning all values Programming Software Development by pritaeas LOL. I did too earlier, but he didn't seem to pick that up... ;D Re: BlockRead is not returning all values Programming Software Development by LizR True, although icount doesnt get set to a value so that wouldnt work without either setting a value, or changing it as we've both said.. either way, hes gone awful quiet :) Re: how to use AssignFile, Reset, FileSize, BlockRead, CloseFile on C++ Builder?? Programming Software Development by Duoas I've only used these things in [b]Delphi[/b], but it looks right to me. The only concern I have is based upon your error message: what kind of thing is [b]OpenDialog1[/b]? Is it a [i]pointer[/i] to a [b]TOpenDialog[/b]? (And not an direct object or a reference?) Is it [i]visible[/i] in the current scope where you are using it? Hope this … Re: how to use AssignFile, Reset, FileSize, BlockRead, CloseFile on C++ Builder?? Programming Software Development by chotib thanks for the reply, yes its and its _visible_, i dunno why it can be error ?? im confused Re: Dynamic array and BlockRead malfunction? Programming Software Development by pritaeas 216 is an access violation. Most likely you're not allowed to write to the dynamic array like that. Apart from that, you set the dynamic array to the filesize. It should be filesize divided by the size of a single record. Re: Dynamic array and BlockRead malfunction? Programming Software Development by hanzo2001 > 216 is an access violation. Most likely you're not allowed to write to the dynamic array like that > > Apart from that, you set the dynamic array to the filesize. It should be filesize d 216... the example used in the docs uses a fixed size array but I don't see the problem of initializing the array size. The docs are clear that the … Re: Dynamic array and BlockRead malfunction? Programming Software Development by hanzo2001 > use an old fashioned hack with a static array. I'm going to try this and I'll report back if it works... It most surely will ^^ -- EDIT -- **It works** like a charm. Now I'll search for a way to generate the array in a procedure and pass it out to a dynamicly sized array. I suppose I'll have to pull out the elements and copy them to the … Re: Dynamic array and BlockRead malfunction? Programming Software Development by pritaeas If I find something I'll post it. Re: Dynamic array and BlockRead malfunction? Programming Software Development by pritaeas [Here](http://www.tek-tips.com/viewthread.cfm?qid=1484875) is a nice discussion on a similar issue. Re: Dynamic array and BlockRead malfunction? Programming Software Development by hanzo2001 > Here is a nice discussion on a similar issue. Bookmarked and saved. Thankyou very much ^^ Re: Saving and recording data Programming Software Development by pritaeas It's hard to make a design choice for you, but if I were to do this, I'd probably store it in the class. If the class is designed correctly, you can just stream the entire object to file/stream, and read it back in again (WriteComponent/ReadComponent). Re: Saving and recording data Programming Software Development by DelphiGuy Ye that's what I was thinking but the class has moving objects, i.e. changing variables and it needs to record all the different changes so would I have to WriteComponent each time and would it append the data?