File_ReadBlock()

Parent Previous Next

Syntax

File_ReadBlock(ByRef pBufferAddr As Dword, pLength As Word), Word

Parameters

pBufferAddr — destination string buffer array — a string variable is required here, since ByRef passes its address automatically

pLength       — number of bytes to read


Return value — number of bytes actually read (less than pLength if EOF hit)


Reads block data from file into srting array


Reads up to pLength bytes from the currently open file with File_Open() or File_OpenAt() into a string buffer array pBufferAddr.

Example

    Dim sTemp As String * 40                'Create string array variable

    Clear sTemp                             'Clear string array

    File_Open("temp.txt")                   'Open file "temp.txt"

    File_ReadBlock(sTemp, 9)                'Read a block of 9 bytes (characters) and place them in sTemp  

    File_Close()                            'Close file

Created with the Personal Edition of HelpNDoc: Make Help Documentation a Breeze with a Help Authoring Tool