how can I use public SDKError GetMeetingUIWnd(ValueType hFirstView, ValueType hSecondView) to get the window handle of Meeting UI?

what arguemtns should I pass to the public SDKError  GetMeetingUIWnd(ValueType hFirstView, ValueType hSecondView)  and what’s the returned result?

1 Like

I’m using zoom_sdk_c_sharp_wrap, and here’re the code snippets:

 

ZOOM_SDK_DOTNET_WRAP.HWNDDotNet firstHwd = new ZOOM_SDK_DOTNET_WRAP.HWNDDotNet();
            ZOOM_SDK_DOTNET_WRAP.HWNDDotNet secondHwd = new ZOOM_SDK_DOTNET_WRAP.HWNDDotNet();

            ZOOM_SDK_DOTNET_WRAP.SDKError error = ZOOM_SDK_DOTNET_WRAP.CMeetingUIControllerDotNetWrap.Instance.GetMeetingUIWnd(firstHwd, secondHwd);

            if (error == ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS)

 

the value of error equals ZOOM_SDK_DOTNET_WRAP.SDKError.SDKERR_SUCCESS which means the call to  GetMeetingUIWnd succeeded, but firstHwd and secondHwd still keeps original.

hi,

please call this api after you get the inmeeting status.

regards

dats.

@dats liao, I did as you told me. But I still cannot get the window handle.

here’re the code snipptes:

        public void onMeetingStatusChanged(MeetingStatus status, int iResult)
        {
            switch(status)
            {
                case ZOOM_SDK_DOTNET_WRAP.MeetingStatus.MEETING_STATUS_INMEETING:
                    GetMeetingUIHwnd();
                    break;

                case ZOOM_SDK_DOTNET_WRAP.MeetingStatus.MEETING_STATUS_ENDED:
                case ZOOM_SDK_DOTNET_WRAP.MeetingStatus.MEETING_STATUS_FAILED:
                    {
                        Show();
                    }
                    break;
                default://todo
                    break;
            }
        }

 

 

        private void GetMeetingUIHwnd()
        {
            ZOOM_SDK_DOTNET_WRAP.HWNDDotNet firstHwd = new ZOOM_SDK_DOTNET_WRAP.HWNDDotNet();
            ZOOM_SDK_DOTNET_WRAP.HWNDDotNet secondHwd = new ZOOM_SDK_DOTNET_WRAP.HWNDDotNet();

            ZOOM_SDK_DOTNET_WRAP.SDKError error = ZOOM_SDK_DOTNET_WRAP.CMeetingUIControllerDotNetWrap.Instance.GetMeetingUIWnd(firstHwd, secondHwd);
        }

 

I debugged the managed C++ code, I saw the window handle. But back to C# code, nothing returned. So I believed I should pass parameters by reference. I never have the experience of calling managed C++ code with C#, Can anyone help me?

here’re the managed C++ code snippets:

 SDKError CMeetingUIControllerDotNetWrap::GetMeetingUIWnd(HWNDDotNet^ hFirstView, HWNDDotNet^ hSecondView)
 {
  
  HWND hFirstView_c(NULL), hSecondView_c(NULL);
  SDKError err = (SDKError)ZOOM_SDK_NAMESPACE::CSDKWrap::GetInst().GetMeetingServiceWrap().
   GetUIController().GetMeetingUIWnd(hFirstView_c, hSecondView_c);

  Convert_HWND(hFirstView_c, hFirstView);
  Convert_HWND(hSecondView_c, hSecondView);

  return err;
 }

 

it worked as expected. 

 

and here’are the C# calling code snippets:

        private void GetMeetingUIHwnd()
        {
            ZOOM_SDK_DOTNET_WRAP.HWNDDotNet firstHwd = new ZOOM_SDK_DOTNET_WRAP.HWNDDotNet();
            ZOOM_SDK_DOTNET_WRAP.HWNDDotNet secondHwd = new ZOOM_SDK_DOTNET_WRAP.HWNDDotNet();
         
            ZOOM_SDK_DOTNET_WRAP.SDKError error = ZOOM_SDK_DOTNET_WRAP.CMeetingUIControllerDotNetWrap.Instance.GetMeetingUIWnd( firstHwd,  secondHwd);
        }

 

the arguments remain unchanged.

1 Like

hi,after debug, this is a bug of our c# wrap. thanks for your feedback. we will fix this bug in next windows sdk release. 

regards

dats