Share via


CaptureBuffer.Write(Int32,Stream,Int32,LockFlag) Method (Microsoft.DirectX.DirectSound)

Writes data to the capture buffer.

Definition

Visual Basic Public Sub Write( _
    ByVal bufferStartingLocation As Integer, _
    ByVal data As StreamLeave Site, _
    ByVal numberBytesToWrite As Integer, _
    ByVal flag As LockFlag _
)
C# public void Write(
    int bufferStartingLocation,
    StreamLeave Site data,
    int numberBytesToWrite,
    LockFlag flag
);
C++ public:
void Write(
    int bufferStartingLocation,
    StreamLeave Sitedata,
    int numberBytesToWrite,
    LockFlag flag
);
JScript public function Write(
    bufferStartingLocation : int,
    data : StreamLeave Site,
    numberBytesToWrite : int,
    flag : LockFlag
);

Parameters

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

Remarks

Exceptions

ArgumentExceptionLeave Site

An invalid parameter was passed to the called method, or numberBytesToWrite is set to zero.

ArgumentNullExceptionLeave 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.

NotSupportedExceptionLeave 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.