System::ReadFile

System::ReadFile will read in the contents of a file previously opened by System::CreateFile.

public System::ReadFile(
   OSHandle FileHandle,
   Integer Length = TVariable::None,
   Integer Position = TVariable::None
:  BString FileContents
);

Parameters

FileHandle From previous call to System::CreateFile.
Length Will read the entire file to end if default parameter is passed.
Position Will read from the current file position if default parameter is passed.
FileContents A buffer containing the contents of the file successfully read.

Return Values

The error.errorCode value will be set to the underlining windows error message code and the error.errorString will have a detailed description of the error.

Remarks

Example Use
variable fileHandle, fileBuffer;
System::CreateFile(L"MyFile.txt",System::OPEN_EXISTING|System::READ_ONLY:fileHandle);
System::ReadFile(fileHandle:fileBuffer);
System::MessageBox(fileBuffer.ToString(),L"File Contents of MyFile.txt");

Requirements

TScript Version: 1.0

Also See

System::CreateFile, System::SetFilePointer, System::WriteFile
 

Contact Ekky Software

All around the world Ekky Software is contactable seven days of the week by submitting the following details.

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript