BinaryStream.Constructor(Handle as Integer, Type as Integer)

From Xojo Documentation

Revision as of 21:48, 1 February 2011 by Npalardy (talk | contribs) (Created page with '{{ConstructorBox | name=Constructor | owner=BinaryStream | ownertype=class | scope=public | parameters=Handle as Integer, Type as Integer | platform=all }} Creates …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Constructor

BinaryStream.Constructor(Handle as Integer, Type as Integer)


Creates a BinaryStream from an OS handle. Type is one of the HandleType class constants and Handle is the appropriate handle type specified by the Type parameter. The HandleType class constants are as follows: 1- HandleTypeWin32Handle. A Windows32 OS handle. 2- HandleTypeFilePointer. A file pointer. 3- HandleTypeFileNumber. A file descriptor. 4- HandleTypeMacFileRefNum. A file reference number. 5- HandleTypeMacFileSpecPointer. An FSSpec. For instance, you can use a Declare to open a file with whatever permissions that you wish, and then pass the Handle to a stream object's constructor