I need to track calls to GetDC GDI32 API. I have already explored all the IAT, Export Table, system wide patching by tracking process creation etc. I need to track the GetDCs without spying the processes on the system.
If there is a undocumented way of accessing the DC cache that is used for GetDCs it would be good. I only saw a way of acessing the global GDI handles table from PEB, which only stores handles that are being accessed, the entries are removed once ReleaseDC is called. Does the global handles table also store references to the DCs stored in the internal DC cache ?