Gets/sets the data in the buffer. When set the value deletes the
current buffer and creates new one containing the assigned data.
Therefore after setting the Value property the buffer size will match
the size of the value set (in bytes). See the remarks.
The data being set must be of VT_UI1 | VT_ARRAY (array of bytes)
type. The returned data is in the same format. This is a de-facto
standard when binary values are transferred and should be compatible
with virtually any existing object which supports binary data (the
streams in this library, ADO, ASP and many others).
Reading a file into the buffer. To read a file in the buffer
you will need an opened SFStream object. Example below illustrates the
technique:
Set o = Server.CreateObject("newObjects.utilctls.SFBinaryData")
Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
Set file = sf.OpenFile(Server.MapPath("test.bin"))
o.Value = file.ReadBin(file.Size)
You can also initialize a SFBinaryData object with binary data from
other streams or from other sources. For example you can read a binary
post in an ASP page directly in one line:
Set o = Server.CreateObject("newObjects.utilctls.SFBinaryData")
o.Value = Request.BinaryRead(Request.TotalBytes)
And then you can process it further.