有没有办法检测屏幕截图或录制? [英] Is there any way to detect a screen capture or recording?

查看:316
本文介绍了有没有办法检测屏幕截图或录制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为朋友制作一个Winforms程序,他想要实现的功能之一是隐藏文本框的内容不被记录;这意味着他希望它免受屏幕截图和屏幕录制的影响.

I'm making a Winforms program for a friend, and one of the functions he wants implemented is to hide the contents of a textbox from being recorded; meaning he wants it safe from screenshots and screen recordings.

在这一点上,我试图解释这个是徒劳的,解释那个

At this point I tried explaining the futility of this, explaining that

  1. 有大量程序可用于记录/捕获屏幕,尝试观看所有程序不仅解释得太详尽,而且毫无意义,因为任何称职的程序员都可以一个可以在不使用任何已知名称的情况下截取屏幕截图的个人程序
  2. 即使您以某种方式设法阻止了每个程序,一个人也只能拍下屏幕的照片

为了回答屏幕截图的问题,他说虽然我们不能让程序完美,但我们可以尽可能地让别人破解"它.(个人意见是他说的有点对,但我认为我们不应该为了这样一个简单的解决方法而过火)

To answer the issue of taking a picture of the screen, he said that while we can't make the program perfect, we CAN make it as hard as possible for someone to "hack" it. (Personal opinion is that he's sort of right, but I don't think we should go overboard for something with such a simple work-around)

他对有大量不同录音程序的问题的回答有点有趣,但我不知道足以给他自信的回答.他的理论是,所有程序中都必须有一些共同的动作,因为在某种程度上,它们都抓取了显示在屏幕上的数据副本以供使用,而且我们理论上应该能够检测到该行动并作出相应的反应.

His answer to the issue of there being tons of different recording program however was sort of interesting, but I don't know enough to give him answer with confidence. He theorized that there HAD to be some common action in all of the programs, since to some degree, they all grab a copy of the data that is displayed on the screen to use, and that we should be able to theoretically be able to detect that action and react accordingly.

所以我的问题是:有谁知道记录屏幕的程序是否有一个共同的动作,如果有一个共同的动作,它是什么?

So my question is this: Does anyone know if there is a common action for programs that record the screen, and if there is a common action, what it is?

推荐答案

所有屏幕捕获程序的工作原理都相同,即与图形引擎交互以捕获某个时间点的屏幕图像,但仅此而已事实上,屏幕捕获完成后没有事件触发器,因此无法检测捕获发生的时间.

All the screen capture programs work the same in that the interact with the graphics engine to capture the image of the screen at a point in time but that is as far as it goes, there is no event trigger when a screen capture is done and so no way to detect when a capture occurs.

屏幕捕获程序访问屏幕的方式是调用GetDC(NULL).然后使用 BitBit 函数将内容复制到位图中.调用 GetDC() 时没有触发事件,可能有一个内置于 Windows 的方法尚未被微软记录并且隐藏在 Windows API 的深处,但目前没有任何记录.

The way a screen capture program gets access to the screen is by calling GetDC(NULL). It then copies the contents into a bitmap using the BitBit function. There is no event triggered when calling GetDC(), there may be a method built into Windows which has not been documented by Microsoft and is hidden deep within the Windows API but nothing which has been documented at this time.

有关这方面的更多信息,请查看 Windows 机密:您的内容看到的是你得到的

For more information on this, take a look at Windows Confidential: What You See Is What You get

这篇关于有没有办法检测屏幕截图或录制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆