# Zoom Windows SDK How to disable Screenshot/Screen recording

**URL:** <https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744>\
**Category:** Windows\
**Created:** [September 30, 2020, 7:36am UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744 "2020-09-30T07:36:56Z")\
**Posts on this page:** 16\
**Page:** 1

<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:** [September 30, 2020, 7:36am UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/1 "2020-09-30T07:36:57Z")

</div>

**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

---

<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:** [October 3, 2020, 6:43am UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/3 "2020-10-03T06:43:34Z")

</div>

**Zoom Windows SDK How to disable Screenshot/Screen recording?**

Anyone could help me to prevent screen recording in Zoom Windows SDK, which cpp file to add the code?

**Kindly help**

---

<div class="post-metadata">

**Author:** ![DennisMay](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@DennisMay](https://devforum.zoom.us/u/DennisMay)\
**Post date:** [October 22, 2020, 8:33pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/4 "2020-10-22T20:33:15Z")

</div>

Hmm, I thought that people only have problems with enabling screen recording, not the other way around. Although maybe I misunderstood the topic.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [October 24, 2020, 7:36am UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/5 "2020-10-24T07:36:27Z")

</div>

Hi @saniltr,

Thanks for the post and pardon the late response. If you would like to disable the recording feature in the meeting, you may disable the local recording or the cloud recording feature on the Zoom web portal. (Settings\>Recording\>Local Recording/Cloud Recording).

If you are looking for a way to prevent people from taking screenshot or recording. SDK does not have any features for this purpose.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![lion.scar](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@lion.scar](https://devforum.zoom.us/u/lion.scar)\
**Post date:** [October 25, 2020, 2:28pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/6 "2020-10-25T14:28:46Z")

</div>

> [@DennisMay](#):
>
> Hmm, I thought that people only have problems with enabling screen recording, not the other way around. Although maybe I misunderstood the topic.

Yeah, it happened to me once) I had some problems with the conference and I could not start screen recording for my students. So we did a little bit differently that day. I send them a quiz and meanwhile started to capture my screen with an online program, if I am not mistaken it was [https://screencapture.com/](https://screencapture.com/). Everything worked out. But zoom recording is way more comfortable during the lecture. 🙂

---

<div class="post-metadata">

**Author:** ![peekaboo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/peekaboo/32/29792_2.png) [@peekaboo](https://devforum.zoom.us/u/peekaboo)\
**Post date:** [August 4, 2021, 10:18pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/7 "2021-08-04T22:18:17Z")

</div>

@carson.zoom I dont think you provided the correct information he required, He wants to protect the demo app window inside zoom SDK C++/C# implementation. SetWindowDisplayAffinity() actually does the job, which would display a black screen of any Windows application (running above windows Vista OS), when ever a built in or 3rd party application tries to record the screen.

Me and my team were trying to do this currently, and we added this method inside the joinMeeting C# class present inside the wrapper files of the demo app.  
It only worked for the first window which prompts for the JWT token, once that screen passes to the zoom call screen where you get meeting video rendered, It was not working and the screen capture/Screen shot worked.

If anyone could let us know about the which class of the demo app/SDK has the entry point on which the later parts of the screen are rendered/initiated, It would be a big help.

Thanks in Advance.

---

<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:** [August 7, 2021, 2:20pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/9 "2021-08-07T14:20:54Z")

</div>

@peekaboo We have already implemented preventing screen capturing while in a Zoom meeting.  
Now it’s shows a black screen… 🙂

Kindly do the following steps, which we have done…  
Add the following codes in the file **zoom\_sdk\_dotnet\_wrap.cpp** inside **zoom\_sdk\_c\_sharp\_wrap** folder…

```auto
BOOL CALLBACK EnumWindowsCB(HWND hwnd, LPARAM lParam)
	{
		SetWindowDisplayAffinity(hwnd, WDA_MONITOR);
		return TRUE;
	}
	void CZoomSDKeDotNetWrap::DisableScreenRecord() {
		DWORD pid = GetCurrentProcessId();
		EnumWindows(EnumWindowsCB, pid);
		uint8_t *func_data = (uint8_t *)GetProcAddress(GetModuleHandle(L"user32.dll"), "SetWindowDisplayAffinity");
	}

```

Check the image below [**zoom\_sdk\_dotnet\_wrap.cpp**]

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/9/69957cfea43849c3983e6d27d7b9c19ab45e25e7.png)

And then in file **zoom\_sdk\_dotnet\_wrap.h** add the below code…

```auto
void DisableScreenRecord();

```

Check the image below [**zoom\_sdk\_dotnet\_wrap.h**]

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/c/dcaeacac9729178e50ac0cda63f6aa8c5dc0268c.png)

After that please build the **zoom\_sdk\_dotnet\_wrap.dll** file add it to your C# project…

In your C# project add the below line, in the Zoom SDK joinmeeting form…

```auto
ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.DisableScreenRecord();

```

Check the image below

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/9/8969e3c76b46ef1c109826f29aa3eb1d460c3cb2.png)

Hope this helps…

Thanks!

---

<div class="post-metadata">

**Author:** ![peekaboo](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/peekaboo/32/29792_2.png) [@peekaboo](https://devforum.zoom.us/u/peekaboo)\
**Post date:** [August 9, 2021, 7:20pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/10 "2021-08-09T19:20:17Z")

</div>

@saniltr Thanks a-ton for your reply and your highly comprehensive explanation, We were stuck with this for weeks, and you made everything clear for us. Have a wonderful day ahead.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 9, 2021, 7:36pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/11 "2021-08-09T19:36:58Z")

</div>

Thank you so much for providing this @saniltr! This is a great help to the community 🙂

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bemikhan](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@bemikhan](https://devforum.zoom.us/u/bemikhan)\
**Post date:** [September 1, 2021, 7:09pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/13 "2021-09-01T19:09:04Z")

</div>

Yes, it happened to me once) I couldn’t start recording my students’ screens during the conference. Our strategy that day was a bit different. After sending a quiz, I began capturing my screen using an online program, if I’m not mistaken. Everything turned out well. It’s more comfortable to record in zoom mode during lectures

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 1, 2021, 8:21pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/14 "2021-09-01T20:21:26Z")

</div>

Hey @bemikhan,

Thanks for using the dev forum!

I am happy to hear everything turned out well.

Michael

---

<div class="post-metadata">

**Author:** ![bemikhan](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@bemikhan](https://devforum.zoom.us/u/bemikhan)\
**Post date:** [September 8, 2021, 5:12am UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/15 "2021-09-08T05:12:11Z")

</div>

Thank you, Michael i like the content on this forum.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [September 8, 2021, 6:28pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/16 "2021-09-08T18:28:45Z")

</div>

Hey @bemikhan,

Happy to hear 🙂

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![bemikhan](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@bemikhan](https://devforum.zoom.us/u/bemikhan)\
**Post date:** [September 9, 2021, 5:57pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/17 "2021-09-09T17:57:46Z")

</div>

> [@bemikhan](#):
>
> Thank you, Michael i like the on this forum.

Welcome. Michael. i am happy to have on this forum.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [December 9, 2021, 11:03pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/18 "2021-12-09T23:03:19Z")

</div>

Closing as resolved.

-Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [December 9, 2021, 11:03pm UTC](https://devforum.zoom.us/t/zoom-windows-sdk-how-to-disable-screenshot-screen-recording/31744/19 "2021-12-09T23:03:22Z")

</div>

Closed on December 9, 2021, 11:03pm UTC


