Takuma's Duplicate Display Check

Harold L Hunt II huntharo@msu.edu
Tue Mar 2 04:32:00 GMT 2004


Takuma,

Your duplicate display check in InitOutput.c seems correct to me.

The only question I have is if the mutex allocated by CreateMutex is 
visible by XWin.exe running under a different session on Terminal Services.

Oops, I just looked it up and answered my own question:

========================================================================
Terminal Services:  The name can have a "Global\" or "Local\" prefix to 
explicitly create the object in the global or session name space. The 
remainder of the name can contain any character except the backslash 
character (\). For more information, see Kernel Object Namespaces.

Windows XP:  Fast user switching is implemented using Terminal Services 
sessions. The first user to log on uses session 0, the next user to log 
on uses session 1, and so on. Kernel object names must follow the 
guidelines outlined for Terminal Services so that applications can 
support multiple users.

Windows 2000:  If Terminal Services is not running, the "Global\" and 
"Local\" prefixes are ignored. The remainder of the name can contain any 
character except the backslash character.

Windows NT 4.0 and earlier:  The name can contain any character except 
the backslash character.

Windows 95/98/Me:  The name can contain any character except the 
backslash character. The empty string ("") is a valid object name.
========================================================================

We can easily add "Global\" to the name, but I think we have to have a 
way to detect that the NT version is greater than 4.0, since it sounds 
like CreateMutex may fail on Windows 95/98/Me/NT 4.0 if you pass it a 
"\" in the name.

I am going to add the "Global\" to CVS... and possibly a way to make 
sure that "Global\" is only prepended for NT > 4.0.

Harold



More information about the Cygwin-xfree mailing list