Microsoft DirectX 9.0 SDK Update (October 2004)

Buffer.Write Method

Language:

Note: This documentation is preliminary and is subject to change.

Writes data to the buffer.

Definition

Visual Basic .NET Public Sub Write( _
    ByVal bufferStartingLocation As Integer, _
    ByVal data As Array, _
    ByVal flag As LockFlag _
)
C# public void Write(
    int bufferStartingLocation,
    Array data,
    LockFlag flag
);
Managed C++ public: void Write(
    int bufferStartingLocation,
    Array *data,
    LockFlag flag
);
JScript .NET public function Write(
    bufferStartingLocation : int,
    data : Array,
    flag : LockFlag
);

Parameters

bufferStartingLocation System.Int32. An integer that represents the offet, in bytes, of where to begin writing into the buffer.
data System.Array. An Array Leave Site that contains the data to write into the buffer.
flag Microsoft.DirectX.DirectSound.LockFlag. A LockFlag enumerated value that describes the type of lock to perform.

Remarks

Exceptions
ArgumentException Leave Site An invalid parameter was passed to the called method, or numberBytesToWrite is set to zero.
ArgumentNullException Leave Site One or more parameters is null.
BufferLostException The buffer memory has been lost and must be restored.
InvalidCallException The method call is invalid. For example, a method's parameter might not be valid.
NotSupportedException Leave Site Unable to read from the source stream object, data. Check if the stream is readable.
PriorityLevelNeededException A cooperative level of Priority or higher is required.

Applies To

SecondaryBuffer

© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center