/// <summary> /// Sets the cooperative level of the application for this sound device. /// </summary> /// <param name="hWnd">Handle to the application window.</param> /// <param name="level">The requested level.</param> public void SetCooperativeLevel(IntPtr hWnd, DSCooperativeLevelType level) { DirectSoundException.Try(SetCooperativeLevelNative(hWnd, level), "IDirectSound8", "SetCooperativeLevel"); }
/// <summary> /// Sets the cooperative level of the application for this sound device. /// </summary> /// <param name="hWnd">Handle to the application window.</param> /// <param name="level">The requested level.</param> /// <returns>DSResult</returns> public DSResult SetCooperativeLevelNative(IntPtr hWnd, DSCooperativeLevelType level) { return(InteropCalls.CalliMethodPtr(UnsafeBasePtr, hWnd.ToPointer(), unchecked ((int)level), ((void **)(*(void **)UnsafeBasePtr))[6])); }