Device.SetCooperativeLevel(Control,CooperativeLevel) Method (Microsoft.DirectX.DirectSound)

Sets the cooperative level of the application for this sound device.

Definition

Visual Basic Public Sub SetCooperativeLevel( _
    ByVal owner As ControlLeave Site, _
    ByVal level As CooperativeLevel _
)
C# public void SetCooperativeLevel(
    ControlLeave Site owner,
    CooperativeLevel level
);
C++ public:
void SetCooperativeLevel(
    ControlLeave Siteowner,
    CooperativeLevel level
);
JScript public function SetCooperativeLevel(
    owner : ControlLeave Site,
    level : CooperativeLevel
);

Parameters

owner System.Windows.Forms.Control
The System.Windows.Forms.ControlLeave Site of the application that is using the Device object.
level Microsoft.DirectX.DirectSound.CooperativeLevel
The requested cooperative level. Specify one of the values shown in the following table

Remarks

The application must set the cooperative level by calling this method before its buffers can be played.

Exceptions

AllocatedException

The request failed because resources, such as a priority level, were already in use by another caller.

ArgumentExceptionLeave Site

An invalid parameter was passed to the called method.

SoundException

Root exception type for all DirectSound exceptions. Derives from DirectXException.

UnsupportedException

The function called is not supported at this time.