On Thu, 16 May 2019 19:53:33 +0200, Mike Wey wrote:

On 15-05-2019 13:32, Alex X wrote:

On Tue, 14 May 2019 19:44:01 +0200, Mike Wey wrote:

On 14-05-2019 05:10, Alex X wrote:

Any news on this?

https://forum.dlang.org/thread/bznpylcjostbrrwzhmst@forum.dlang.org

It's severely cramping my style ;/

Unfortunately no.

Ok, So I figured you probably don't care enough to invest your time to fix it so I went ahead and looked in to it and was able to get it fixed:

That is indeed partly the case, although i did find an option for win XP
and older.

This seems like an interesting solution, overriding the memory that
holds the original SetWindowsHookExA. That does mean care should be
taken that the size of the replacement function is not to large.

As you can see, I'm simply using a single ret to break out of the call so when gtk calls it, nothing actually happens and the hook doesn't get set.

This works on my system because I inspected the assembly code. I won't work for x86 because the code is more complex and the stack needs to be free'ed. Since I'm not using x64 and only using this for debugging I'll go with the hack.

As I said, Detours is a C library that does this stuff correctly so if you want a solution that should work in general this would be the way to go. It actually correctly deals with redirection.

If you you can isolate the call to a local spot in code and disable it using this method then it would be optimal(and of course have it optional).

It does what I need it to do. If you don't do anything with it at least others have a chance of having a working solution.

I don't use XP... but what's the solution?