kiuser behavior / zwcontinue / signatures

Questions about Wine on Linux
Locked
KutaG59
Newbie
Newbie
Posts: 1
Joined: Mon Jul 15, 2024 3:51 am

kiuser behavior / zwcontinue / signatures

Post by KutaG59 »

How well/How is kiuser behavior implemented in wine? I am trying to use a software that relies on "kiuserexceptiondispatcher" to hook onto a process (thats running on another Wine/Proton/Native prefix).
The issue at first, was the software not being able to hook into the process because it couldn't see it, after tinkering with wine/mono/runtimes, I was able to get it to detect the software under wine, but it hard crashes immediately on inject. I can only assume its because of a incompatibility between wine and windows kiuserexceptiondispatcher behavior.

The process looks to do something like

Code: Select all

"if(g_windows_ki_fn) g_windows_ki_fn(ExceptionRecord, ContextRecord)"
so that said software could set something like

Code: Select all

"g_windows_ki_fn = ExceptHook"
Adding onto that, The Dev does want to add Wine/Proton support, but this is holding them back and they aren't Linux savvy, so they cannot exactly find the issue.
I've found a recent message from them, stating that if they were to support wine, wine would have to support

Code: Select all

void ExceptHook(PEXCEPTION_RECORD ExceptionRecord, PCONTEXT ContextRecord)
"and that signature and would need to support zwcontinue resumes" - Said Dev

I tried browsing the source code to find my own Answers, but I got lost a lot, and ended up not being able to find a few things.

If this is not already a supported thing, Would I be able to implement it and request a merge as said on the FAQ about contributing to wine?
Or is this not really a feasible thing as of right now?

sorry if my question is odd/doesn't make much sense, or if I may seem ignorant/misinformed, English is my 2nd language.
Attachments
Screenshot from Dev of what "I originally tried but didnt work for whatever reason"
Screenshot from Dev of what "I originally tried but didnt work for whatever reason"
User avatar
DarkShadow44
Level 9
Level 9
Posts: 1338
Joined: Tue Nov 22, 2016 5:39 pm

Re: kiuser behavior / zwcontinue / signatures

Post by DarkShadow44 »

Would you be able to provide a simple example program that works on windows but fails on wine?
Locked