# C# windows SDK - Mute - Unmute Error

**URL:** <https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027>\
**Category:** Windows\
**Created:** [December 30, 2021, 5:17am UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027 "2021-12-30T05:17:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wbx440](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@wbx440](https://devforum.zoom.us/u/wbx440)\
**Post date:** [December 30, 2021, 5:17am UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027/1 "2021-12-30T05:17:49Z")

</div>

Unable to Mute Unmute Properly.  
To mute all users, I have to write:  
meetingAudioController.MuteAudio(0, false); //here if i specify User Id, it gives me error: SDKERR\_WRONG\_USEAGE

Also this above line, mutes my speaker & I am unable to turn on my speakers back until zoom is in play

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 30, 2021, 8:34pm UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027/2 "2021-12-30T20:34:10Z")

</div>

Hi @wbx440, thanks for the post.

Please note that I have moved your post over to the #desktop-meeting-sdk:windows category. 🙂

One cause of this error when trying to unmute others is when the current user does not have the ability to unmute other users in the meeting. Can you please confirm whether or not the user is the host of the meeting when trying to do this?

Thanks!

---

<div class="post-metadata">

**Author:** ![wbx440](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@wbx440](https://devforum.zoom.us/u/wbx440)\
**Post date:** [December 31, 2021, 2:22am UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027/3 "2021-12-31T02:22:20Z")

</div>

I found multiple issues here…

**Issue 1**. If I mute all users using this code:  
meetingAudioController.MuteAudio(0, false); //so no one can turn on his mute  
Then I have to unmute them using this code:  
meetingAudioController.MuteAudio(0, true); // so anyone who want to speak will be able to turn on his mic

Mute or Unmute using user id like this:  
meetingAudioController.MuteAudio(UserId, true or false); //will not work  
meetingAudioController.UnMuteAudio(UserId); //will not work

Even here SDKError shows success.

**Issue 2** : Leave meeting is not working properly, I am the host & trying to leave meeting using:  
cZoomSDKWrap.GetMeetingServiceWrap().Leave(LeaveMeetingCmd.END\_MEETING);  
cZoomSDKWrap.GetMeetingServiceWrap().Leave(LeaveMeetingCmd.LEAVE\_MEETING);

Here whether I use Leave Meeting or End Meeting Command, both or 1 at a time, in all cases, meeting not get ended…

Now here another issue come into picture that other users available in the meeting I think converted to be the host & now when I start meeting again, it works like I am joining the meeting & on trying mute - unmute not, it says: SDKERR\_WRONG\_USEAGE

So now 1st issue is resolved but because of 2nd issue, I face 1st issue.

**So finally here the issue is that ending a meeting (when I am the host) is not actually ending meeting for all…**

---

<div class="post-metadata">

**Author:** ![wbx440](https://avatars.discourse-cdn.com/v4/letter/w/3bc359/32.png) [@wbx440](https://devforum.zoom.us/u/wbx440)\
**Post date:** [January 2, 2022, 2:57pm UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027/4 "2022-01-02T14:57:48Z")

</div>

FYI: I have started meeting using this code:

StartParam4NormalUser normalUser = new StartParam4NormalUser();  
normalUser.meetingNumber = MY\_PERSONAL\_MEETING\_NO;  
normalUser.isDirectShareDesktop = true;

StartParam startParam = new StartParam();  
startParam.normaluserStart = normalUser;  
startParam.userType = SDKUserType.SDK\_UT\_NORMALUSER;

SDKError sdkErr = CZoomSDKeDotNetWrap.Instance.GetMeetingServiceWrap().Start(startParam);  
//sdkErr → its success

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 3, 2022, 8:05pm UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027/5 "2022-01-03T20:05:57Z")

</div>

Hi @wbx440,

If you are unable to end the meeting when leaving, it is possible that the current user is not the host of the meeting. Can you please confirm whether or not the user is the host before calling the `Leave` function by checking the value of [`IsHost`](https://marketplacefront.zoom.us/sdk/meeting/windows/class_i_user_info.html#a4dd3760d6fde8ad685d39fbcb425e1b7) for the current user?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 3, 2022, 6:06am UTC](https://devforum.zoom.us/t/c-windows-sdk-mute-unmute-error/62027/6 "2022-02-03T06:06:18Z")

</div>

Closed on February 3, 2022, 6:06am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
