Share via


GraphicsStream.Read(Byte[],Int32,Int32) Method (Microsoft.DirectX)

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Definition

Visual Basic Overrides Public Function Read( _
    ByVal buffer() As Byte, _
    ByVal offset As Integer, _
    ByVal count As Integer _
) As Integer
C# public override int Read(
    byte[] buffer,
    int offset,
    int count
);
C++ public:
virtual int Read(
    array<unsigned char>^ buffer,
    int offset,
    int count
) override;
JScript public override function Read(
    buffer : byte[],
    offset : int,
    count : int
) : int;

Parameters

buffer System.Byte[]
Reference to a ByteLeave Site array that is used as the read buffer.
offset System.Int32
Value that specifies the offset, from the start of the buffer, of the data read from buffer.
count System.Int32
Value that specifies the number of bytes to read.

Return Value

System.Int32
Integer that represents the number of bytes read into buffer from the graphics stream.

Remarks

Exceptions

NotSupportedExceptionLeave Site

Unable to read from the stream buffer, or there is no data to read.

ArgumentExceptionLeave Site

One of the parameters is invalid, the stream buffer is not large enough to hold the requested data, or ranks is greater than three.