Getting the "current instance" in Zoom C++ SDK

I’m currently writing some C++ code to get raw audio data for a meeting. This isn’t available in the C# wrapper which is why I’m using the C++ SDK.

In C#, there is this nice concept got the current instance which you can always retrieve via ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance to perform operations. I’m wondering:

  1. Is there an equivalent function in C++ that I can retrieve the current instance from? Specifically, I need an instance of the object I can call GetAudioRawdataHelper on.
  2. If I am using both the C++ SDK as well as the C# wrapper, will the “Current Instance” for both the C# and C++ code refer to the same object?

Which Windows Client SDK version?

Device (please complete the following information):

  • OS: Windows 10

Hey @tyler,

Thanks for using the dev forum! It is nice to see you again :slight_smile:

There is not an equivalent for this in C++. The C++ Windows SDK is the only version of the SDK that does not have a designated singleton. You would have to create and instance of the SDK, and its relative services, then store them into a static object to mirror this behavior. There is an example of how to do this in the C++ demo application; the class is called SDKInterfaceWrap.

This is a really interesting question! I have never actually tried to this, but I think it may be possible with some manual work. I wouldnt really recommend this path because troubleshooting could get very complicated, but here is my idea: If you implement a singleton like my above comment, you could initialize the SDK in the C# version and then point the C++ singleton instance to the C# “currentInstance” object. I am not an expert with C#, so I am not entirely sure how to go about this, but I think this is possible as long as the SDK is only initialized/authed by one or the other and not both. I would keep in mind, though, that the SDK was not designed to behave this way, so we would not be able to provide developer support for the issues that come from this.


Thanks @Michael_Condon!

1 Like

Hey @tyler,

You are very welcome!


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