BinaryStream.Handle

From Xojo Documentation

Method

BinaryStream.Handle(type as IOStreamHandleTypes) As Ptr

New in 2019r2

Supported for all project types and targets.

Returns a handle of the Type passed.

Exceptions

Exception Reason
IOException Raised when Handle cannot return the type requested.

Notes

The BinaryStream class constants given below can be passed as the parameter.

Constant Description
HandleTypeWin32Handle A Windows32 OS handle.
HandleTypeFilePointer A file pointer.
HandleTypeFileNumber A file descriptor.

Sample Code

The following code gets a Win32 handle.

Var i As Integer
i = ReadStream.Handle(BinaryStream.HandleTypeWin32Handle)