Microsoft DirectX 9.0 SDK Update (October 2004)

Buffer.Clone Method

Language:

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

Duplicates the buffer object.

Definition

Visual Basic .NET Public Function Clone( _
    ByVal parent As Device _
) As Buffer
C# public Buffer Clone(
    Device parent
);
Managed C++ public: Buffer* Clone(
    Device *parent
);
JScript .NET public function Clone(
    parent : Device
) : Buffer;

Parameters

parent Microsoft.DirectX.DirectSound.Device. The Device object associated with the buffer.

Return Value

Microsoft.DirectX.DirectSound.Buffer . A Buffer object that represents the cloned buffer.

Remarks

This method is not valid for buffers created with BufferCaps.ControlEffects set to true.

Initially, the duplicate buffer will have the same parameters as the original buffer. However, the application can change the parameters of each buffer independently, and each can be played or stopped without affecting the other.

Exceptions
ArgumentNullException Leave Site The parent parameter is null.
AllocatedException The request failed because resources, such as a priority level, were already in use by another caller.
InvalidCallException The method call is invalid for the current state of this object.
ArgumentException Leave Site An invalid parameter was passed to the method.

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