Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About Task bar Notifier : Plz Help Pin
RickyC16-Sep-05 1:29
RickyC16-Sep-05 1:29 
QuestionCTabCtrl help Pin
Barm15-Sep-05 18:40
Barm15-Sep-05 18:40 
Questionwhich control is like grid of edit boxes Pin
tejaswi-teja15-Sep-05 18:23
tejaswi-teja15-Sep-05 18:23 
AnswerRe: which control is like grid of edit boxes Pin
Manfred Staiger15-Sep-05 22:06
Manfred Staiger15-Sep-05 22:06 
AnswerRe: which control is like grid of edit boxes Pin
S Douglas15-Sep-05 22:18
professionalS Douglas15-Sep-05 22:18 
QuestionAbout CMutex : Plz Help Pin
parims15-Sep-05 18:15
parims15-Sep-05 18:15 
AnswerRe: About CMutex : Plz Help Pin
karmendra_js15-Sep-05 19:17
karmendra_js15-Sep-05 19:17 
GeneralRe: About CMutex : Plz Help Pin
Blake Miller16-Sep-05 4:49
Blake Miller16-Sep-05 4:49 
This is FAR TOO OFTEN overlooked aspect of naming synchronization objects.

If this is run from a terminal services console or as a service, that is the only instance that can work on the entire system - the mutext will be seen across all sessions. If this is started first from a terminal services session, then other sessions could also start, since the mutex will have local scope.

If you REALLY REALLY only want one instance on the enire computer, then you need to put "Global\" in front of your mutex name. If you really want each terminal services session to only run a single instance, then put "Local\" in front of your mutex name.

Services and the console terminal services session share the same scope.
So, if you want the console session to be able to run at the same time as it runs as a service, then you need a different name when it runs as as service.

From MSDN:

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 Home Edition: 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: The name can contain any character except the backslash character.

Windows Me/98/95: The name can contain any character except the backslash character. The empty string ("") is a valid object name.
AnswerRe: About CMutex : Plz Help Pin
ThatsAlok15-Sep-05 19:34
ThatsAlok15-Sep-05 19:34 
AnswerRe: About CMutex : Plz Help Pin
Sonani Prakash15-Sep-05 22:21
Sonani Prakash15-Sep-05 22:21 
AnswerRe: About CMutex : Plz Help Pin
Eytukan15-Sep-05 23:51
Eytukan15-Sep-05 23:51 
GeneralRe: About CMutex : Plz Help Pin
Blake Miller16-Sep-05 4:53
Blake Miller16-Sep-05 4:53 
GeneralRe: About CMutex : Plz Help Pin
ThatsAlok16-Sep-05 21:07
ThatsAlok16-Sep-05 21:07 
QuestionKiosks Pin
ColinDavies15-Sep-05 17:53
ColinDavies15-Sep-05 17:53 
AnswerRe: Kiosks Pin
Christian Graus18-Sep-05 11:03
protectorChristian Graus18-Sep-05 11:03 
GeneralRe: Kiosks Pin
ColinDavies18-Sep-05 15:04
ColinDavies18-Sep-05 15:04 
GeneralRe: Kiosks Pin
Christian Graus18-Sep-05 15:08
protectorChristian Graus18-Sep-05 15:08 
QuestionGUI themes for Windows application Pin
Member 190283715-Sep-05 17:39
Member 190283715-Sep-05 17:39 
QuestionMFC connect to Crystal report using Microsoft Access Pin
bryan52315-Sep-05 17:32
bryan52315-Sep-05 17:32 
Questionacess violation... Pin
Tim Zorn15-Sep-05 13:54
Tim Zorn15-Sep-05 13:54 
AnswerRe: acess violation... Pin
Christian Graus15-Sep-05 14:15
protectorChristian Graus15-Sep-05 14:15 
GeneralRe: acess violation... Pin
Tim Zorn16-Sep-05 12:16
Tim Zorn16-Sep-05 12:16 
GeneralRe: acess violation... Pin
Christian Graus18-Sep-05 11:02
protectorChristian Graus18-Sep-05 11:02 
QuestionREG_BINARY size problem? Pin
YaronNir15-Sep-05 11:18
YaronNir15-Sep-05 11:18 
AnswerRe: REG_BINARY size problem? Pin
Graham Bradshaw15-Sep-05 13:35
Graham Bradshaw15-Sep-05 13:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.