ChangeUserName function is returning SDKERR_INTELNAL_ERROR error

Description
Hi
I am using latest ZOOM sdk version of v5.0.24433.0616 in Visual studio 2017 C++. I want to change user name after In meeting status. I am currently using ChangeUserName function of IMeetingParticipantsController. But it is returning SDKERR_INTELNAL_ERROR.
What am i doing wrong? Can you please help me?

Which version?
v5.0.24433.0616

Code which i am using for it
ZOOMSDK::IMeetingService* pMeetingService = SDKInterfaceWrap::GetInst().GetMeetingService();
ZOOMSDK::IMeetingParticipantsController* pController = pMeetingService->GetMeetingParticipantsController();
if (pController)
{
ZOOM_SDK_NAMESPACE::IUserInfo* puserInfo = getCurrentUserInfo();
if (puserInfo)
{
ZOOMSDK::SDKError error = pController->ChangeUserName(puserInfo->GetUserID(), displayTitle.c_str(), false);
if (error == ZOOM_SDK_NAMESPACE::SDKERR_SUCCESS)
sendMeetingInfoCommand();
}
}

getCurrentUserInfo function is returning my userinfo.

Log file link
https://drive.google.com/file/d/1Js5ATRHJcO3q2Wj1KYwvG51haHk4vJJP/view?usp=sharing

Waiting for your reply.
Thanks

@Carson_Chen - any joy?

Hi @vaghaninirav10,

Thanks for the post and pardon the late response. Based on the log provided, the request to change the user name was failed but it did not show the root cause. Based on the code snippet, we are able to use the code snippet provided and successfully change user name with our demo app(So we are not able to reproduce this issue with our demo app). Is this happening every time you run this code?

Thanks!

Hi thanks for replying.
Yes it is happening every time when i run this code.

Hi @vaghaninirav10,

Thanks for confirming. Based on the log, it looks like the interface changeUserName function is not called in the main thread. The SDK interfaces need to be called in the main thread. Please have a try.

Thanks!

Thank you so much.
Its working.

Glad to hear that! Then I will go ahead and close this thread. Please feel free to create another post if any other questions. :slight_smile: