IVsDataReader.GetBytes Method (Int32, [], Int32, Int32)
When implemented by a class, retrieves a specified number of bytes of raw binary data.
Namespace: Microsoft.VisualStudio.Data.Services.SupportEntities
Assembly: Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)
Syntax
'宣言
Function GetBytes ( _
index As Integer, _
buffer As Byte(), _
bufferIndex As Integer, _
length As Integer _
) As Integer
'使用
Dim instance As IVsDataReader
Dim index As Integer
Dim buffer As Byte()
Dim bufferIndex As Integer
Dim length As Integer
Dim returnValue As Integer
returnValue = instance.GetBytes(index, _
buffer, bufferIndex, length)
int GetBytes(
int index,
byte[] buffer,
int bufferIndex,
int length
)
int GetBytes(
int index,
array<unsigned char>^ buffer,
int bufferIndex,
int length
)
function GetBytes(
index : int,
buffer : byte[],
bufferIndex : int,
length : int
) : int
Parameters
index
Type: System.Int32Index in the current block of data for the item to retrieve.
buffer
Type: []An array into which specified data, as byte array, should be placed. If a null reference (Nothing in Visual Basic), this method returns the size required of the array in order to fit all of the specified data.
bufferIndex
Type: System.Int32Index of the starting point in the byte array specified with the buffer parameter.
length
Type: System.Int32The number of bytes to be read into the byte array specified with the buffer parameter.
Return Value
Type: System.Int32
An integer value indicating the number of bytes read into the buffer.
Remarks
When data is presented by the DDEX provider in the form of raw bytes, call this method to read only a specified number of bytes into an existing client-side buffer. This performs better than simply retrieving the whole value, which causes all the data to be read and allocated in memory.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.Data.Services.SupportEntities Namespace