C# Wrapper: Add_CB_onUserAudioStatusChange no userId

I am implementing the callback to Add_CB_onUserAudioStatusChange, but I always get 0 as user Id.
Here is some sample code:

        private void OnUserAudioStatusChange(IUserAudioStatusDotNetWrap[] lstAudioStatusChange)
            if (lstAudioStatusChange == null || lstAudioStatusChange.Length == 0)

            for (int i = lstAudioStatusChange.GetLowerBound(0); i <= lstAudioStatusChange.GetUpperBound(0); i++)
                var change = (IUserAudioStatusDotNetWrap)lstAudioStatusChange.GetValue(i);

                Debug.WriteLine($"User audio status: {change.GetUserId()}, status {change.GetStatus()}", nameof(ZoomService));

This is the result:

ZoomService: User audio status: 0, status Audio_UnMuted
ZoomService: User audio status: 0, status Audio_Muted
ZoomService: User audio status: 0, status Audio_UnMuted

What’s wrong with my code? Is it a problem of the sdk/wrapper?


Hi bragma,

Thanks for the post and pardon the late response. The code snippet looks great but the result sounds unexpected. To further investigate this issue, you may modify the C# wrapper and make it debuggable, and see if the class IUserAudioStatusDotNetWrapImpl is being used correctly and sees the return value from the Windows SDK interfaces.

Hope this helps. Thanks!

Hi @Carson_Chen, the bug @bragma found is indeed in the C# wrapper. I found the issue and created a pull request at https://github.com/zoom/zoom-c-sharp-wrapper/pull/26. The issue was the wrapper was not actually returning the wrapped value properly (there was a missing return!). I hope this helps you @bragma. @Carson_Chen let me know if there is a better way to get this reviewed with the team. The change is very small


Thanks @async, I’ve quickly checked the code but didn’t notice the missing return!

Hi @async,

Thanks for the reply and the pull request! I will forward that to the engineering team for review. Please feel free to submit a pull request if you found any other places that could be improved.

Thanks again!

I confirm this is solved in windows SDK v5.0.24433.0616

1 Like