ReadFileBlock

Prev Next Home Home Table Of Contents Index

ReadFileBlock (Name,Offset,Size,Segment)

ReadFileBlock reads disk file Name starting at byte Offset for Size bytes into memory buffer Segment. It is intended to read any kind of file.

The maximum value for Size is 65504. The segment must be as large as the number of bytes you are reading. The following example will copy a small file.


Example:
Var RamBlock Size Size = FileSize 'MARXREAD.ME' RamBlock = GetMem(Size) ReadFileBlock('MARXREAD.ME' 0 Size RamBlock) WriteFileBlock('COPYREAD.ME' 0 Size RamBlock) FreeMem(RamBlock)

See Also: WriteFileBlock GetMem FreeMem

Category: File Memory

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home