G
G
gapaned6442021-01-26 20:53:49
Programming
gapaned644, 2021-01-26 20:53:49

Is it possible to track whether a screenshot was taken inside the desktop application?

Can a desktop app track if a screenshot was taken by another app?
And does it depend on the technology with which the application is written (which can potentially track)? For example, C/C++, C# can, but JS/Electron cannot track whether a screenshot was taken by third-party software.

OS: Windows and macOS.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
B
BasiC2k, 2021-01-26
@BasiC2k

Screenshot taken on the phone can not be tracked.

S
Sergey Karbivnichy, 2021-01-26
@hottabxp

On Windows, you can try to intercept the functions GetForegroundWindow, GetWindowRect, and a few more. But first you need to figure out what methods there are for taking a screenshot.
Theoretically, heuristic analysis can be applied. For example, if a program calls the GetForegroundWindow, GetWindowRect, CreateCompatibleDC, and some other methods, then theoretically it can take a screenshot.

R
rPman, 2021-01-26
@rPman

In the general case, this is impossible to do, I remember exactly using directx (for sure and opengl / vulkan) you can get direct access to the contents of the screen or video card buffers.
On stackexchange, it was advised to hang yourself on events and analyze memory, literally all, incl. for the presence of jpeg/png/...
headers. That is, the ban is possible only by administrative means.

A
acwartz, 2021-01-26
@acwartz

Headache of any anti-cheat and cheating programs))
It can be implemented by intercepting various functions, both direct assignment and rendering functions of the protected application, almost direct buffer capture from the video card and other perversions from ring0. But as mentioned above, the photo taken on the phone - no one will track.

C
CityCat4, 2021-01-27
@CityCat4

No. Well, in general.
I launched the program in VB, and I take a screenshot in the host axis using the axis itself - how do you track the occurrence of an event that you have no idea about?
Although some SMPs like Stakhanovets, I think, are capable, but only because they put their agent.
By the way, about "take a picture of the screen" - Stakhanovets has such a feature (I haven't checked it myself yet) - if there is a camera on the computer, it tracks an attempt to take a picture of the screen! Orwell cries with envy... :)

A
Alexander Skusnov, 2021-01-27
@AlexSku

Check buffer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question