How can I get process id in WDDM driver

176 views Asked by At

Now I'm programming on the WDDM driver, I want to get the process id of the application which generates the picture. I use the function psGetCurrentProcessId but it returns 4 that is the system process, how can I get the real process id?

1

There are 1 answers

0
Jaylon On

PS: The WDDM driver is a virtual driver, I use it to maintain pictures and send them to remote clients to display(like RDP). so I must compress the pictures before transmission. When I get the process id of the application, I can compress the pictures belong to the corresponding application to decide compression algorithm in lossy or lossless.