Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SetWindowDisplayAffinity - Protect window from screenshots/Software capture ?
#1
Hi !

Today at work i received a "Protected mail" in my outlook mailbox. It turns out that you can't take a screenshot of this type of e-mail, as it appears blacked out on the screenshot !

Intrigued, I searched a bit and found these functions :

SetWindowDisplayAffinity ( https://docs.microsoft.com/fr-fr/windows...dfrom=MSDN )
GetWindowDisplayAffinity (  https://docs.microsoft.com/en-us/windows...ayaffinity  )

I tried to "Import" them in QM, looking at how it's done in WinConstants & WinFunctions, but the function always returns me 0

Am i missing something or maybe this function would not work for what i want ?

Thanks in advance !

Macro Macro9
Code:
Copy      Help
dll user32
,#SetWindowDisplayAffinity hWnd dwFlags
,#GetWindowDisplayAffinity hWnd pdwAffinity

def WDA_NONE 0x00000000
def WDA_MONITOR 0x00000001
def WDA_EXCLUDEFROMCAPTURE 0x00000011


int w=win("Notepad")
_i=SetWindowDisplayAffinity(w WDA_EXCLUDEFROMCAPTURE)
out _i


Messages In This Thread
SetWindowDisplayAffinity - Protect window from screenshots/Software capture ? - by Extreme - 01-31-2022, 09:05 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)