IVsDataReader.GetBytes 方法 (String, array<Byte , Int32, Int32)

当实现由选件类,检索指定的字节数原始的二进制数据。

命名空间:  Microsoft.VisualStudio.Data.Services.SupportEntities
程序集:  Microsoft.VisualStudio.Data.Services(在 Microsoft.VisualStudio.Data.Services.dll 中)

语法

声明
Function GetBytes ( _
    name As String, _
    buffer As Byte(), _
    bufferIndex As Integer, _
    length As Integer _
) As Integer
int GetBytes(
    string name,
    byte[] buffer,
    int bufferIndex,
    int length
)
int GetBytes(
    String^ name, 
    array<unsigned char>^ buffer, 
    int bufferIndex, 
    int length
)
abstract GetBytes : 
        name:string * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int 
function GetBytes(
    name : String, 
    buffer : byte[], 
    bufferIndex : int, 
    length : int
) : int

参数

  • name
    类型:System.String
    项目的名称可以检索原始的二进制数据。
  • buffer
    类型:array<System.Byte[]
    指定数据,以字节数组应将数组。如果 nullnull 引用(在 Visual Basic 中为 Nothing),此方法将返回该范围要求数组以容纳所有指定的数据。
  • bufferIndex
    类型:System.Int32
    的索引在字节数组页指定与 buffer 参数。
  • length
    类型:System.Int32
    要读取的字节数到字节数组中指定与 buffer 参数。

返回值

类型:System.Int32
指示字节数的整数值读取到缓冲区中。

备注

以原始的字节数组的形式时,DDEX提供程序显示数据,请调用此方法读取仅指定的字节数到现有的客户端缓冲区。这是为了更好地检索所有的值,内存中会导致所有数据读取和分配。

.NET Framework 安全性

请参见

参考

IVsDataReader 接口

GetBytes 重载

Microsoft.VisualStudio.Data.Services.SupportEntities 命名空间