Welcome, Guest.
Username: Password: Remember me

TOPIC: Hook into Windows desktop

Hook into Windows desktop 2 months 1 week ago #1

Is there any chance to hook ReShade into the windows desktop? I want to inject CustomFX(grain, colorcorrection) into the desktop for calibrating monitors with Nvidia GPUus to correct the horrible banding artefacts. It works perfectly for games (huge thanks to Marty McFly!) just need it at the desktop too!

Also want to write my own shader that takes screen uniformity measurements from DispcalGUI to correct the colour uniformity of the screen.

I notice DXTory (or was it Fraps?) is able to overlay a FPS counter onto the desktop, so it seems to be possible in theory.
Here is a library that may offer some help
github.com/DarthTon/Xenos
The administrator has disabled public write access.

Hook into Windows desktop 2 months 6 days ago #2

So the desktop window manager (windows\system32\dwm.exe) is the process which does all the desktop compositing in DX9. Does that mean I can install ReShade files to the system32 folder , replacing the d3d9.dll in system32 folder with the ReShade one?

I'm thinking it will not work and break something :lol:

Might have to backup my computer first and then try replacing the files in safe mode or something.

Would be so awesome if it worked 3d LUT calibration with dithering on everything, and even the future possibility of screen uniformity correction.
The administrator has disabled public write access.

Hook into Windows desktop 2 months 6 days ago #3

  • JBeckman
  • JBeckman's Avatar
  • Offline
  • Posts: 163
  • Thank you received: 36
You don't want to replace the core d3d9.dll, dxgi,dll or opengl32.dll files in the Windows folder, ever. :)
(It'll break DirectX after all - or OpenGL if that's the file you were to replace. - and the DirectX runtime setup from MS only adds the supplementary files whereas these core files require a full OS reinstall to correct if dism or sfc can't restore them properly.)
Last Edit: 2 months 6 days ago by JBeckman.
The administrator has disabled public write access.

Hook into Windows desktop 2 months 6 days ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2457
  • Thank you received: 1393
It will break ReShade too. Never ever replace the system DLLs.
The desktop is not rendered via 3D acceleration, so ReShade cannot hook into it.
Cheers, crosire =)
The administrator has disabled public write access.

Hook into Windows desktop 2 months 6 days ago #5

Thanks, I will not be messing with those files anytime soon :)

But crosire, are you sure about that because here it says Desktop Window Manager uses DirectX9: en.wikipedia.org/wiki/Desktop_Window_Manager

Since dwm.exe resides in /system32 I presume it uses the d3d9.dll's in there too?

And here is a video where you can see Fraps can overlay its FPS meter onto the Aero desktop which means it is somehow getting its hooks into dwm.exe .



If only there was a way to hook reshade in too!

edit: maybe it's not getting a hook, just "always on top" :oops:
Last Edit: 2 months 6 days ago by pneumatic.
The administrator has disabled public write access.

Hook into Windows desktop 2 months 5 days ago #6

  • JBeckman
  • JBeckman's Avatar
  • Offline
  • Posts: 163
  • Thank you received: 36
Fraps, MSI Afterburner or any other overlay using a exe would work since they could target explorer.exe without needing to replace the core DirectX .dll files.

If made compatible with it the "AppInit" (I think that's what it's called.) global injection method would also work without replacing system files but it requires a very well maintained blacklist or a strict whitelisting system since you do not want ReShade to inject into every single process in Windows not to mention any other application on the system since ReShade32.dll or ReShade64.dll would otherwise always be loaded into a application as it was started.
(GeDoSaTo uses this via a whitelist only system as if it's newer versions.)

Has other drawbacks too such as potentially triggering SecureBoot functionality of modern UEFI bioses to block the injection unless disabled.
The administrator has disabled public write access.