Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error in parameter" with negative window handles #94

Open
pjeby opened this issue Jan 2, 2025 · 2 comments
Open

"Error in parameter" with negative window handles #94

pjeby opened this issue Jan 2, 2025 · 2 comments

Comments

@pjeby
Copy link

pjeby commented Jan 2, 2025

Although /LWOD is listing negative window handles like -925692446, passing that handle into e.g. /GDFWH: does not work: it says "Error in parameter" instead. Converting the negative number to its two's complement (3369274850) doesn't work either, presumably because it overflows the int32 type being used. I'm guessing it also might just be that the code is checking for positive numbers when it'd be equally valid for them to be negative - probably just checking for != 0 instead of >0 would fix it.

@MScholtes
Copy link
Owner

Hello @pjeby,

I thought it could never come to this. How long your Windows is running?

I will check for this and think will resolve in the next release.

Greetings

Markus

@pjeby
Copy link
Author

pjeby commented Jan 6, 2025

Thanks! Thing is, it's not a matter of sequential assignment -- most of my windows had very small handles, only a few had the negative ones, and after a while those were gone too. I'm not able to get negative handles by any specific process, they just show up sometimes, no idea why. It's probably something pseudorandom, because one of my desktops has these handles right now:

462710
854932
12846466
133258
1576062
8849888
394998
394980
2296792

And AFAICT there is no correlation between the magnitude of the handle and how new/old the window is. Most handles are 6 digits, and a few are 7 or 8... apparently some very rare ones hit 9 or 10.

Anyway, thanks for having a look-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants