How to disable Screenshot/capturing while meeting in C#, Zoom Windows SDK

Hi there, I am using zoom windows SDK for C# implementation. I am trying to prevent the meeting screen from being captured by screenshot or any sort of capture. I have seen a solution on the portal but that is of no help as that code is showing some errors when I try to copy that for testing. Following is the link to that solution:

I have tried to copy paste the C++ code from the above link by following the steps mentioned there but the BOOL, function name and the parameter names are recognized by the compiler.

Please help me with some suitable solution.

Hi @searchbarzoom, thanks for using the dev forum.

If you would like to enable/disable being able to show the meeting window programmatically, you can use the EnableShowMyAppWindowWhenShare function.

I have tried to copy paste the C++ code from the above link by following the steps mentioned there but the BOOL, function name and the parameter names are recognized by the compiler.

It sounds like you are working in a C# environment, so I would not expect the compiler to recognize C++ syntax. You can certainly use the C# wrapper, but as noted in our documentation, there is currently limited support for it. The SDK is natively written in C++, so in order to get the complete feature set, using the C++ SDK is recommended. Depending on your use case, there may be pieces of functionality missing from the C# wrapper which you would need to implement and rebuild the wrapper as outlined here.

Thanks!

@jon.lieblich thanks for answering but I am not writing that code in C# rather I am following the steps and writing the code in C++ in the C++ project in the following files

zoom_sdk_dotnet_wrap.cpp
zoom_sdk_dotnet_wrap.h

as it is told in the link which I have initially posted but I receive errors on building and when I remove the code then the errors are removed. Here I unable to upload the image otherwise I have shown you the screenshot. Please let me know how can I resolve and prevent my screen to be appeared in the screenshot I mean currently it gets displayed but I want it to be black or blur when someone tries to take screenshot while meeting.
Following are the 4 errors which I get at the time of compilation:

unresolved token (0A00092D) "extern “C” int stdcall EnumWindows(int (stdcall*)(struct HWND *,long),long)" (?EnumWindows@@$$J18YGHP6GHPAUHWND@@J@ZJ@Z) referenced in function “public: void __clrcall ZOOM_SDK_DOTNET_WRAP::CZoomSDKeDotNetWrap::DisableScreenRecord(void)” (?DisableScreenRecord@CZoomSDKeDotNetWrap@ZOOM_SDK_DOTNET_WRAP@@$$FQ$AAMXXZ)


```
unresolved token (0A00092F) extern C int __stdcall SetWindowDisplayAffinity(struct HWND__ *,unsigned long) (?SetWindowDisplayAffinity@@$$J18YGHPAUHWND__@@K@Z) referenced in function int __stdcall ZOOM_SDK_DOTNET_WRAP::EnumWindowsCB(struct HWND__ *,long) (?EnumWindowsCB@ZOOM_SDK_DOTNET_WRAP@@$$FYGHPAUHWND__@@J@Z)
```

```
unresolved external symbol extern C int __stdcall SetWindowDisplayAffinity(struct HWND__ *,unsigned long) (?SetWindowDisplayAffinity@@$$J18YGHPAUHWND__@@K@Z) referenced in function int __stdcall ZOOM_SDK_DOTNET_WRAP::EnumWindowsCB(struct HWND__ *,long) (?EnumWindowsCB@ZOOM_SDK_DOTNET_WRAP@@$$FYGHPAUHWND__@@J@Z)
```

```
unresolved external symbol extern C int __stdcall EnumWindows(int (__stdcall*)(struct HWND__ *,long),long) (?EnumWindows@@$$J18YGHP6GHPAUHWND__@@J@ZJ@Z) referenced in function public: void __clrcall ZOOM_SDK_DOTNET_WRAP::CZoomSDKeDotNetWrap::DisableScreenRecord(void) (?DisableScreenRecord@CZoomSDKeDotNetWrap@ZOOM_SDK_DOTNET_WRAP@@$$FQ$AAMXXZ)
```

Thank you @jon.lieblich but I am using the same C++ code inside the C++ wrap project provided by you guys running that code in the C++ environment but still at the time building I get errors but when I remove this code from

zoom_sdk_dotnet_wrap_def.h
zoom_sdk_dotnet_wrap_def.cpp

then the build gets successful. Please help me how can I make it done. If you can allow me to send screenshots here then I can share some more details but I am unable to upload the image.

Hi @searchbarzoom,

Unfortunately we cannot provide much C# wrapper support beyond what is mentioned in the documentation linked to in my previous reply.

Thanks!

hi @jon.lieblich thank you. can you guide me ho can I make installer of the app once I am done with this process. Please let me know about this as I have created one but after installation it opens up but does not work as required any help or article would be appreciated.

Hi @searchbarzoom,

Creating an installer through your IDE does not directly involve the SDK, so we unfortunately cannot provide much guidance there. I would recommend looking directly at Microsoft’s documentation, or asking on a general software development community, such as StackOverflow. :slightly_smiling_face:

Thanks!

Hi @searchbarzoom ,

As you mentioned about disabling screenshot/capturing in Windows SDK.
The link mentioned which I have implemented disabling screenshot is with Windows SDK Version: v5.0.24433.0616
https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744

Don’t know whether it would work with the latest SDK version.
Will let you know if I could find any solution for this.

Thanks
SANIL T R

Hi @searchbarzoom,
I have found a solution for the issues you are facing…
Please follow the below steps to overcome the issue and you will no longer get the error unresolved token (0A00092F) extern C int __stdcall SetWindowDisplayAffinity as mentioned.

Right click on the project zoom_sdk_dotnet_wrap Select Properties. Check the screenshot below for your reference. On the Project property page, expand Linker Select Input and on the right side first dropdown Additinal Dependencies select inherit from parent or project defaults and Click Apply. Close the Property page, rebuild the zoom_sdk_dotnet_wrap project. The error will be gone.

Hope this helps…

Thanks,
SANIL T R

1 Like

Hi @saniltr ,

Thanks for the solution! Found your post how to disable screen recording, but failed due to the compilation errors occurred. We were using the latest Zoom Windows SDK but were stuck in between. But your solution made our day.

https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744

Thanks!

1 Like

Thanks for providing a solution!

1 Like

Hi @jon.lieblich ,

If the issue is solved. Kindly mark the reply as a Solution please.

Thanks,
SANIL T R

Sure thing, and thank you for continuing to help out the developer community!

1 Like