From RAD Studio API Documentation
Jump to: navigation, search


property Handle: THandle read FHandle;


__property NativeUInt Handle = {read=FHandle, nodefault};


Type Visibility Source Unit Parent
property public
System.Classes THandleStream


Specifies the handle for the communications resource the stream reads from and writes to.

Read Handle to get the handle for file management functions. To read from or write to the resource, use the methods of the THandleStream object.

Handle is a read-only property. The handle property cannot be changed to allow the handle stream to switch from reading to writing or vice versa. For example, to change from a file handle that is opened in read-only mode to one that is opened in write mode:

  1. Free the stream object.
  2. Call FileClose to close the file.
  3. Reopen the file in write mode and use the handle to create a new instance of a handle stream. Alternately, open a TFileStream object for the file, specifying a write mode for the stream.

Note: Do not call the FileClose function on the Handle until after the THandleStream object has been destroyed.

See Also