[ros-bugs] [Bug 6109] WIP: fixes for desktop.c and winsta.c

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Sun Apr 17 21:06:27 UTC 2011


http://www.reactos.org/bugzilla/show_bug.cgi?id=6109





--- Comment #14 from luluthefirst <luluthefirst at hotmail.fr>  2011-04-17 21:06:26 CET ---
(In reply to comment #12)
> You are comparing the session Id with the process session handle:
> > if(PsGetCurrentProcess()->Session != DesktopObject->rpwinstaParent->SessionId)
> This is by chance working on our current hacked implementation (the SessionId
> is the Session handle casted to ULONG) but it is not correct.

No it's not an handle, I've checked:
http://doxygen.reactos.org/d0/d69/structEPROCESS.html

P.S: This big horrible error must be fixed : HANDLE UniqueProcessId (since
there is Id at the end)

> The session check is also not neccessary, since win32k is (once we support
> this) loaded on a per session basis. So all handles are session wide. If the
> handle is valid in the current session, then the object belongs to the current
> session.

But I've seen on the SwitchDesktop documentation that it returns an error when
it tries to switch to a desktop that doesn't belong to the current session.
That's maybe a general error for every API that want an handle

"Return Values
...
When hDesktop is an invalid handle, refers to a destroyed desktop, or belongs
to a different session than that of the calling process".

That's on the Platform SDK 2003 R2 documentation.

> Can you explain why there would be crash when the new desktop equals the old
> one?
> Btw, please don't mix tabs and spaces for indentation, use spaces only.
> 


For the crash, I've tested putting co_IntInitializeDesktopGraphics() inside
SwitchDesktop function, but at shut down it crashed, and when I have prevented
from switching to the old desktop, then it stopped the crash, and aslo it's
useless to switch to the old desktop again, so it should be optimized.


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the Ros-bugs mailing list