Device.SetCooperativeLevel Method

Language:

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

Definition

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

Parameters

owner System.IntPtr
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.
ArgumentException Leave 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.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.