EasyManua.ls Logo

Crestron SIMPL+ - FileClose Function

Crestron SIMPL+
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Software Crestron SIMPL+
®
122 z SIMPL+
®
Language Reference Guide - DOC. 5797G
FileClose
Name:
FileClose
Syntax:
SIGNED_INTEGER FileClose (INTEGER handle)
Description:
Closes a file opened previously by FileOpen. You MUST close a file that was
opened, you won’t be able to open it again, or eventually the control system may hang
or reboot. A reboot clears all open files. Files must be opened and closed during a
single thread of operation. Refer to “StartFileOperations()” on page 183.
Parameters:
HANDLE specifies the file handle of the previously opened file (from FileOpen).
Return Value:
Returns 0 if successful. Otherwise, file error code is returned.
Example:
(Refer to "File Functions Overview"on page 116)
SIGNED_INTEGER nFileHandle;
StartFileOperations();
nFileHandle = FileOpen ( “MyFile”, _O_RDONLY );
IF (nFileHandle < 0)
{
PRINT(“Error Opening File MyFile\n”);
return;
}
IF ( nFileHandle > 0 )
{
IF ( FileClose ( nFileHandle ) <> 0 )
PRINT ( “Error closing file\n” );
}
EndFileOperations();
Version:
SIMPL+ Version 3.00.02 or higher (Pro 2 only)
Control System:
2-Series Only

Table of Contents

Other manuals for Crestron SIMPL+

Related product manuals