| Platform SDK: DirectX |
The DirectSound.SetCooperativeLevel method sets the cooperative level of the application for this sound device.
object.SetCooperativeLevel(hwnd As Long, _
level As CONST_DSSCLFLAGS)
If the method fails, an error is raised and Err.Number may be one of the following error values.
| DSERR_ALLOCATED |
| DSERR_INVALIDPARAM |
| DSERR_UNINITIALIZED |
| DSERR_UNSUPPORTED |
The application must set the cooperative level by calling this method before its buffers can be played. The recommended cooperative level is DSSCL_PRIORITY; use other priority levels when necessary.
The hwnd parameter should be the top-level application window handle. If you are also using DirectDraw, it must be the same handle passed to the DirectDraw7.SetCooperativeLevel method.