https://bugs.winehq.org/show_bug.cgi?id=51899
--- Comment #10 from O. Nykyforchyn oleh.nyk@gmail.com --- (In reply to Bruni from comment #9)
BTW, have you managed to figure out what's the 0x1f0000 magic number stands for? I could not find an explanation in Wine source.
Yes, it's just a mask for bits that contain handle type.
It seems it may take really long time to investigate DC attributes with unclear semantics the next time it will be broken (which seems inevitable).
I am afraid nobody can do anything with this because Windows behaves this way.
Each time someone fixes a bug and the expression if this 'if' becomes more monstrous.
If you have found out what the beast is 0x1f0000 there is a point to decomposite that monster expression in 'if' into a few branches.
This expression tests whether the supplied handle is valid, I see no way to make the code with it simpler.
BTW, I submitted
https://source.winehq.org/patches/data/218030