Zoom Windows SDK How to disable Screenshot/Screen recording

Zoom Windows SDK How to disable Screenshot/Screen recording?

In C# Winforms we do it like this:

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

1 Like

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

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

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!

1 Like

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/. Everything worked out. But zoom recording is way more comfortable during the lecture. :slight_smile:

1 Like

@Carson_Chen 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.

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

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…

		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]

And then in file zoom_sdk_dotnet_wrap.h add the below code…

void DisableScreenRecord();

Check the image below [zoom_sdk_dotnet_wrap.h]

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…


Check the image below

Hope this helps…



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

1 Like

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


1 Like

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

Hey @bemikhan,

Thanks for using the dev forum!

I am happy to hear everything turned out well.


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

1 Like

Hey @bemikhan,

Happy to hear :slight_smile:


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

Closing as resolved.