File_WriteBlock()

… visits
Parent Previous Next

Syntax

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

Parameters

Parameter

Description

pBufferAddr

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

pLength

number of bytes to write

Return value

number of bytes actually written (less than pLength if disk fills up)

Overview

Writes block data to file from a string array


Writes pLength bytes from a string buffer array pBufferAddr to the currently open file with File_Append()

Example

Dim sTemp As String * 40                'Create string array variable

sTemp = "Test string"                   'Place some text in this string variable

File_Append("temp.txt")                 'Open file "temp.txt" ready to append data

File_WriteBlock(sTemp, 8)               'Write block of data with length 8 into "temp.txt" from sTemp

File_Close()                            'Close file

Created with the Personal Edition of HelpNDoc: Modernize your help files with HelpNDoc's WinHelp HLP to CHM conversion tool