This project is COMPLETELY BROKEN and 99% of the code in this repository is not mine. It is in vmcall's dxgkrnl_hook page. If you wanna use a working and improved version of this, goto my project: https://github.com/BadPlayer555/KernelGDIDraw.
If you wanna see more about this please go to his github reprository https://github.com/vmcall/dxgkrnl_hook and his write-up https://vmcall.blog/nt/2019/10/18/kernel_gdi_hook.html.
If you wanna try to make it working again, feel free to do it. Also, I haven't included the pointer to ntGetDC etc.