0

I am programming video player with C# and WPF. And try to do two things :

  1. Blacklist screen recording program => Don't allow users to open any Blacklist process while running my video player application.
  2. Whitelist => Only allow some processes that can open while running my video player application. ex. mspaint, notepad, calculator, etc.

Sorry for my poor English but please help! Thank you in advance.

Daniel Larsson
  • 527
  • 2
  • 6
  • 23
  • 2
    You can't. Your program does not have the right to do that. Even if you elevate privileges to do so, there are about a thousand ways around your "security". You could however try to create a HdcpSession which is an OS level concept to prevent copying of your video... – Aron Nov 04 '18 at 17:53
  • I saw one application can do it. It close itself when detect blacklist process open while running application. – Kit Pradidmaneechot Nov 04 '18 at 17:58
  • 1
    That's very different - you can't stop users opening another app, but you can take actions in your own app in response to other apps opening. – Philip Kendall Nov 04 '18 at 18:00
  • 1
    I have a thousand ways around that. Including renaming the process for video capture. USE HDCP it is literally the reason it was created. Stop trying to roll your own DRM. – Aron Nov 04 '18 at 18:01

1 Answers1

0

You can shut down your application based off your blacklist / whitelist rules:

Get running processes in C#:

How can I list all processes running in Windows?

Programmatically shut down a WPF application:

How do I exit a WPF application programmatically?

Kip Morgan
  • 728
  • 3
  • 12