Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#os4units]

DosWrite

Write bytes of data to a file

Declaration

Source position: amigados.pas line 2431

function DosWrite(

  File_: LongInt;

  Buffer: Pointer;

  Length: LongInt

):LongInt;

Arguments

File_

  

File handle

Buffer

  

Pointer to a buffer to write to file

Length

  

Number of bytes to write. The filesystem is advised to try to fulfill the request as good as possible.

Function result

Number of bytes written, -1 for error.

Description

DosWrite() writes bytes of data to the opened file file. length indicates the length of data to be transferred; buffer is a pointer to the buffer. The value returned is the length of information actually written. So, when length is greater than zero, the result is the number of characters written. Errors are indicated by a value of -1.

See also

DosRead

  

Read bytes of data from a file

DosSeek

  

Set the current position for reading and writing

DosOpen

  

Open a file for input or output

DosClose

  


Documentation generated on: 2021-07-30