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

**URL:** <https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965>\
**Category:** Windows\
**Created:** [December 28, 2021, 8:07pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965 "2021-12-28T20:07:31Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![searchbarzoom](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@searchbarzoom](https://devforum.zoom.us/u/searchbarzoom)\
**Post date:** [December 28, 2021, 8:07pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/1 "2021-12-28T20:07:31Z")

</div>

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:

> [@Zoom Windows SDK How to disable Screenshot/Screen recording](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744):
>
> Description Zoom Windows SDK How to disable Screenshot/Screen recording? In C# Winforms we do it like this: [DllImport(“user32.dll”)] public static extern uint SetWindowDisplayAffinity(IntPtr hWnd, uint dwAffinity); //call the below in Form\_Load (disable screen recording…) SetWindowDisplayAffinity(this.Handle, 1); The above C# code prevents screen shot/screen recording, and just shows a black screen Which version? Zoom SDK DotNet Wrap v1.0.7472.30017

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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 28, 2021, 11:52pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/2 "2021-12-28T23:52:07Z")

</div>

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`](https://marketplacefront.zoom.us/sdk/meeting/windows/class_i_share_setting_context.html#a9233691c07ed14247e96456c53206415) 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](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/c-sharp-wrapper), 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](https://marketplace.zoom.us/docs/sdk/native-sdks/windows/c-sharp-wrapper#adding-new-interface-in-c-wrapper).

Thanks!

---

<div class="post-metadata">

**Author:** ![searchbarzoom](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@searchbarzoom](https://devforum.zoom.us/u/searchbarzoom)\
**Post date:** [December 29, 2021, 4:41pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/3 "2021-12-29T16:41:03Z")

</div>

@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:

```auto

```

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)

````auto

```
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)
```
````

---

<div class="post-metadata">

**Author:** ![searchbarzoom](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@searchbarzoom](https://devforum.zoom.us/u/searchbarzoom)\
**Post date:** [December 29, 2021, 5:06pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/4 "2021-12-29T17:06:05Z")

</div>

Thank you @jon.zoom 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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 30, 2021, 8:26pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/5 "2021-12-30T20:26:53Z")

</div>

Hi @searchbarzoom,

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

Thanks!

---

<div class="post-metadata">

**Author:** ![searchbarzoom](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@searchbarzoom](https://devforum.zoom.us/u/searchbarzoom)\
**Post date:** [December 30, 2021, 8:49pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/6 "2021-12-30T20:49:53Z")

</div>

hi @jon.zoom 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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 3, 2022, 7:34pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/7 "2022-01-03T19:34:28Z")

</div>

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. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![saniltr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saniltr/32/12526_2.png) [@saniltr](https://devforum.zoom.us/u/saniltr)\
**Post date:** [January 4, 2022, 5:18am UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/8 "2022-01-04T05:18:58Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![saniltr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saniltr/32/12526_2.png) [@saniltr](https://devforum.zoom.us/u/saniltr)\
**Post date:** [January 4, 2022, 8:34am UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/9 "2022-01-04T08:34:51Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/1/719aa35f0e6e48e960b60049ecf1ca60e9ce8433.png)

Hope this helps…

Thanks,  
SANIL T R

---

<div class="post-metadata">

**Author:** ![echu.jeeva](https://avatars.discourse-cdn.com/v4/letter/e/50afbb/32.png) [@echu.jeeva](https://devforum.zoom.us/u/echu.jeeva)\
**Post date:** [January 6, 2022, 3:49pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/10 "2022-01-06T15:49:18Z")

</div>

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](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744)

Thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 7, 2022, 6:02pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/11 "2022-01-07T18:02:09Z")

</div>

Thanks for providing a solution!

---

<div class="post-metadata">

**Author:** ![saniltr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saniltr/32/12526_2.png) [@saniltr](https://devforum.zoom.us/u/saniltr)\
**Post date:** [January 17, 2022, 7:43am UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/12 "2022-01-17T07:43:38Z")

</div>

Hi @jon.zoom ,

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

> [@How to disable Screenshot/capturing while meeting in C#, Zoom Windows SDK](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/9):
>
> 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 inheri…

Thanks,  
SANIL T R

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 21, 2022, 10:51pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/13 "2022-01-21T22:51:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 21, 2022, 10:51pm UTC](https://devforum.zoom.us/t/how-to-disable-screenshot-capturing-while-meeting-in-c-zoom-windows-sdk/61965/14 "2022-01-21T22:51:43Z")

</div>

Closed on January 21, 2022, 10:51pm UTC


