GetParticipantList

Before Creating a New Topic:

If you’re experiencing unexpected Meeting SDK behavior please search the forum with relevant keywords (e.x. error message) and follow the guidance outlined in those posts. Please also leverage the following support links:


Format Your New Topic as Follows:

Meeting SDK Windows v 5.14.0.13926 C++

Description
After joining a meeting, a call to GetParticipantsList() returns 0x00000003
According to the documentation and include files its supposed to return an IList or Null. This value is neither a pointer to an object (list) or Null.
The code used to work fine. But the call fails in this version and the several of the preceding ones.

Error?
Because the result is not Null, I call GetCount() on it and obviously get a Read Access Violation.

Troubleshooting Routes
Re-compiled against older versions of the SDK - the code works.
Looked in changelog - nothing!
Googled - nothing!
Posted on this forum - nothing!

How To Reproduce
Use the Zoom Meeting SDK C++ API on Windows!

1 Like

hi @mike,

I’ve just tested this, and it works ok on 5.14.0.

Some things which I’ve done prior to calling the method.

  • Ensure that my status in MEETING_STATUS_INMEETING. If it is in other status such as JOINING which is one step before INMEETING, this might fail
  • use meetingService to get the Participant Controller, and thereafter GetParticipantsList()
inline bool IsInMeeting(ZOOM_SDK_NAMESPACE::MeetingStatus status)
{
	bool bInMeeting(false);
	if (status == ZOOM_SDK_NAMESPACE::MEETING_STATUS_INMEETING)
	{
		printf("In Meeting Now...\n");
		bInMeeting = true;
	    IList<unsigned int>* participants=	meetingService->GetMeetingParticipantsController()->GetParticipantsList();
		printf("Participants count: %d\n", participants->GetCount());
	}

	return bInMeeting;
}

image

Hope that helps

1 Like

Hi Chun

Thanks for the reply.

I am compiling my code against zoom-sdk-windows-5.14.0.13926
Is that the same version you are using?

Following your suggestion I have declared a variable in my interface object:

MeetingStatus m_lastZoomMeetingStatus = MeetingStatus::MEETING_STATUS_IDLE;

And added a line at the start of my handler for changes to the meeting status to store the status I am passed:

void ZoomInterface::onMeetingStatusChanged(MeetingStatus status, int iResult)
{
    m_lastZoomMeetingStatus = status;
...
}

And tested against it in the function that goes wrong which is now:

IList<unsigned int >* ZoomInterface::GetParticipantsList() {
    ZOOM_SDK_NAMESPACE::IList<unsigned int >* result = NULL;
    IMeetingService* meetingService = getMeetingService();
    if (meetingService && m_lastZoomMeetingStatus == ZOOM_SDK_NAMESPACE::MEETING_STATUS_INMEETING) {
        IMeetingParticipantsController* pPaticipantsCtrl = meetingService->GetMeetingParticipantsController();
        if (pPaticipantsCtrl) {
            result = pPaticipantsCtrl->GetParticipantsList();
        }
    }
    return result;
}

The code fails as before. That is, it obtains a valid meeting service object, the value of the last status passed to me is indeed MEETING_STATUS_INMEETING, it obtains a valid participants controller object, and then the call to GetParticipantsList returns 0x00000003 which is clearly not an IList. A subsequent call to GetCount on this erroneous result crashes the code.

If you can spot an error in my code I would be very grateful. But I should emphasize that this code has been working for a couple of years now, until the most recent releases that is.

Thanks

Mike

1 Like

Hi Again

In the spirit of optimism I just added a call to this function based on yours:

inline bool ZoomInterface::IsInMeeting(ZOOM_SDK_NAMESPACE::MeetingStatus status)
{
    bool bInMeeting(false);
    if (status == ZOOM_SDK_NAMESPACE::MEETING_STATUS_INMEETING)
    {
        printf("In Meeting Now...\n");
        bInMeeting = true;
        IMeetingService* meetingService = getMeetingService();
        if (meetingService) {
            IList<unsigned int>* participants = meetingService->GetMeetingParticipantsController()->GetParticipantsList();
            printf("Participants count: %d\n", participants->GetCount());
        }
    }

    return bInMeeting;
}

to my onMeetingStatusChanged handler and it crashes in exactly the way I described above at the call to GetCount on a value for the participants IList of 0x3!

All / any help welcome!

Thanks

Mike

1 Like

And again in the spirit of optimism, I just reverted to version 5.12.2.9319 and both of these problematic functions work perfectly with exactly the same code. But with version 5.14.0.13926 they both fail.
Hence why I believe the problem is in the Zoom libraries rather than my code. Although I much prefer being proved wrong, rather than being ignored.
Mike

1 Like