MyTDT-Mysoft / DllCompat

dll replacement for vista+ compatibility on windows XP
31 stars 8 forks source link

[broken] KeyCastOW 2.0.2.5 #2

Open pachuco opened 7 years ago

pachuco commented 7 years ago

This one doesn't appear to be missing API, but it's fun to see it spectacularly shit itself in XP.

  1. Setting failure on startup, regardless if ini file is generated.
  2. Overlay elements do not vanish.
  3. CPU spikes when going in and out of settings.

http://brookhong.github.io/2014/04/28/keycast-on-windows.html

tumagonx commented 6 years ago

Hey in the source code I've remove MOD_NOREPEAT so hot key works, but dang! on quitting setting dialog (be it save or cancel) GDI choked for several seconds unless I turned off hook momentarily.

MyTDT-Mysoft commented 6 years ago

ok yeah... all fixed..... the setting dialog choke... is because of the program usage of CreateTimerQueueTimer, and calling long gdi+ functions there, which the DOCS warns to not do... so for some reason win7 is extra resistant to that... or they modified the api to not trigger in certain threads like the hook thread itself lol!!! as for items not desappearing... is because of some FLAGS on gdiplus are used that does not exist on the gdiplus version of XP, but... a new version of it is included (gdiplux) and that makes it work...

also as for fixing the timers i used a APP specific fix, maybe at some point i will be able to have a generic fix, by reimplementing those weak timers... (right now it's re-routing all the timer callbacks to the GUI thread... using POLLING on PeekMessageW+WaitForSingleObject .... because MsgWaitForMultipleObjects prioritizes the wrong type of event... so it still causes multithread issues with the hook... so the polling way fixed everything.... and works like a charm :) (so to compile that you need to uncomment the #include on the specific application... (maybe at some point when we get the loader/shim working... that could be automated with a wizard/gui or a catalog :) (but i declare that as BUGGY APP, that by luck works on win7 :P)

tumagonx commented 4 years ago

thanks a lot! do you have working binary that I could test?

pachuco commented 4 years ago

Oh, they don't provide binary anymore? Hang on... https://web.archive.org/web/20170510080951/https://brookhong.github.io/2014/04/28/keycast-on-windows.html Patch gdiplus -> gdipluz and user32 -> user3x.

Whoops! Forgot about the CPU spike in the settings window.

pachuco commented 4 years ago

Ah yeah, please also patch kernel32 -> kernel3x and use this dll kernel3x.zip

The difference from main build is that this line is uncommented. https://github.com/MyTDT-Mysoft/DllCompat/blob/master/src/dll/kernel3x/kernel3x.bas#L627