Utilities.FileWrite Method

Applies to TestComplete 15.10, last modified on December 01, 2021
This method is obsolete. See the Remarks section below.


The Utilities.FileWrite method writes Count bytes from the Buffer to a file whose handle is specified by the Handle parameter. The file handle is returned by the FileCreate or FileOpen method.


Utilities.FileWrite(Handle, Buffer, Count)

Handle [in]    Required    Integer    
Buffer [in]    Required    Variant    
Count [in]    Required    Integer    
Result Integer

Applies To

The method is applied to the following object:


The method has the following parameters:


Specifies the handle of the desired file.


Specifies the variable from which certain number of bytes will be written to the specified file.


Specifies the number of bytes to be written to the specified file.

Result Value

The method returns the number of bytes that were written to the file successfully. This number may be less than Count. If an error occurs during the writing process, FileWrite returns -1.


This method is obsolete. It is supported for backward compatibility only. To write to text and binary files, use the aqBinaryFile.Write and aqTextFile.Write methods, respectively.

See Also

aqBinaryFile Object Methods
Write Method
OpenBinaryFile Method
OpenTextFile Method
Cursor Property
Cursor Property

Highlight search results