Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNeed an API for getting FDQN of a machine. Pin
shiva e balasubramaniam15-Sep-05 20:15
shiva e balasubramaniam15-Sep-05 20:15 
AnswerRe: Need an API for getting FDQN of a machine. Pin
prasad_som15-Sep-05 21:20
prasad_som15-Sep-05 21:20 
GeneralRe: Need an API for getting FDQN of a machine. Pin
shiva e balasubramaniam16-Sep-05 2:53
shiva e balasubramaniam16-Sep-05 2:53 
GeneralRe: Need an API for getting FDQN of a machine. Pin
prasad_som16-Sep-05 3:14
prasad_som16-Sep-05 3:14 
GeneralRe: Need an API for getting FDQN of a machine. Pin
ThatsAlok16-Sep-05 21:04
ThatsAlok16-Sep-05 21:04 
GeneralRe: Need an API for getting FDQN of a machine. Pin
shiva e balasubramaniam16-Sep-05 21:34
shiva e balasubramaniam16-Sep-05 21:34 
Questionmewtocol in which layer? Pin
Member 216100415-Sep-05 19:59
Member 216100415-Sep-05 19:59 
QuestionAbout Task bar Notifier : Plz Help Pin
parims15-Sep-05 19:42
parims15-Sep-05 19:42 
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 

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.