Поделиться через


IPacket.WriteBytes - метод

Обновлен: Ноябрь 2007

Записывает массив байтов в объект.

Пространство имен:  Microsoft.SmartDevice.DeviceAgentTransport
Сборка:  Microsoft.SmartDevice.DeviceAgentTransport (в Microsoft.SmartDevice.DeviceAgentTransport.dll)

Синтаксис

'Декларация
Sub WriteBytes ( _
    buffer As Byte(), _
    in_bufferSize As UInteger _
)
'Применение
Dim instance As IPacket
Dim buffer As Byte()
Dim in_bufferSize As UInteger

instance.WriteBytes(buffer, in_bufferSize)
void WriteBytes(
    byte[] buffer,
    uint in_bufferSize
)
void WriteBytes(
    [InAttribute] array<unsigned char>^ buffer, 
    [InAttribute] unsigned int in_bufferSize
)
function WriteBytes(
    buffer : byte[], 
    in_bufferSize : uint
)

Параметры

  • buffer
    Тип: array<System.Byte[]
    Массив байтов, записываемый в пакет.
  • in_bufferSize
    Тип: System.UInt32
    Указывает число байтов, записываемых из буфера в пакет.

Примеры

    packet = PacketFactory.GetNewPacket()

    ' Write the version of .NET Compact Framework into the packet.
    packet.WriteString("Hello Desktop Computer")
    packet.WriteInt32(Environment.Version.Major)
    packet.WriteInt32(Environment.Version.Minor)
    packet.WriteInt32(Environment.Version.Build)
    packet.WriteInt32(Environment.Version.Revision)

    ' Pass the packet to desktop application.
    packetStream.Write(packet)

End Sub 'Main
packet = PacketFactory.GetNewPacket();

// Write the version of .NET Compact Framework into the packet.
packet.WriteString("Hello Desktop Computer");
packet.WriteInt32(Environment.Version.Major);
packet.WriteInt32(Environment.Version.Minor);
packet.WriteInt32(Environment.Version.Build);
packet.WriteInt32(Environment.Version.Revision);

// Pass the packet to desktop application.
packetStream.Write(packet);

Разрешения

См. также

Ссылки

IPacket Интерфейс

IPacket - члены

Microsoft.SmartDevice.DeviceAgentTransport - пространство имен