Storages & Files Data property
Data Indexed, Read/Write property.

Reads/Writes part of the buffer.


object.Data([start [,end]]) = value
variable =
object.Data([start [, end]])


start - 0 based index of the start byte in the buffer

end - 0 based index of the end byte in the buffer 


The part of the buffer read/written begins with the byte with index start and ends with the byte end including it. Thus v = o.Data(1,5) will return a byte array with 5 elements, where the first element will be the 1-st byte in the object's buffer and the last will be the 5-the byte. 

When written if the data assigned to the property is bigger than the specified part of the buffer only the first n = end - begin + 1 bytes are consumed (written into the buffer replacing the data in the specified range).

It is an error to call the function with end < begin except if end is -1. When end is -1 this means from the start to the end of the buffer.

The data is returned/expected as byte array (VT_UI1 | VT_ARRAY).

The default values for start and end are both 0. I.e. if the arguments are omitted the first byte of the buffer is returned/replaced.

The property is not affected by the byte order.

Applies to: SFBinaryData object

See also: Size and Value properties, the Slice method.

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later


newObjects Copyright 2001-2006 newObjects [ ]