GetBytes Method
See Also 
SourceCode.SmartObjects.Client Namespace > SmartObjectReader Class : GetBytes Method



i
fieldOffset
buffer
The buffer into which to copy the data.
bufferoffset
The index with the buffer to which the data will be copied.
length
The maximum number of characters to read.

Glossary Item Box

Reads a stream of bytes from the specified column, starting at location indicated by dataOffset, into the buffer, starting at the location indicated by bufferoffset.

Syntax

Visual Basic (Declaration) 
Public Overrides Function GetBytes( _
   ByVal i As Integer, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Byte, _
   ByVal bufferoffset As Integer, _
   ByVal length As Integer _
) As Long
Visual Basic (Usage)Copy Code
Dim instance As SmartObjectReader
Dim i As Integer
Dim fieldOffset As Long
Dim buffer() As Byte
Dim bufferoffset As Integer
Dim length As Integer
Dim value As Long
 
value = instance.GetBytes(i, fieldOffset, buffer, bufferoffset, length)
C# 
public override long GetBytes( 
   int i,
   long fieldOffset,
   byte[] buffer,
   int bufferoffset,
   int length
)
C++/CLI 
public:
int64 GetBytes( 
   int i,
   int64 fieldOffset,
   array<byte>^ buffer,
   int bufferoffset,
   int length
) override 

Parameters

i
fieldOffset
buffer
The buffer into which to copy the data.
bufferoffset
The index with the buffer to which the data will be copied.
length
The maximum number of characters to read.

Return Value

The actual number of bytes read.

Exceptions

ExceptionDescription
System.InvalidCastExceptionThe specified cast is not valid.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also