Storages & Files WriteBin
WriteBin method

Writes binary data to the stream.

Syntax:

variable = object.WriteBin(data)

Parameters:

data - The data to write to the stream. As usual in all similar methods the binary data is expected to be array of bytes (i.e. VT_ARRAY | VT_UI1). Almost any method from any library (ex: ASP, ADO etc.) accepts or returns binary data in this format.

returned value - the number of bytes written to the stream.

Examples:

Set sf = Server.CreateObject("newObjects.utilstls.SFMain")
Set file = sf.CreateFile("C:\myfile.bin")
nBytes = file.WriteBin(Request.BinaryRead(Request.TotalBytes))
file.Close
' This will save the binary input of an ASP page to a file
' Can be useful when testing upload accepting page for example
Response.Write nBytes & " wrutten to the file"

Remarks:

Remarks

Applies to: SFStream object

newObjects Copyright 2001-2006 newObjects [ ]