Article View: borland.public.cppbuilder.nativeapi
Article #387Ensuring single occurance with CreateProcessAsUser and FUS
From: Mike Collins
Date: Sat, 19 Apr 2008 01:53
Date: Sat, 19 Apr 2008 01:53
28 lines
2297 bytes
2297 bytes
Hi guys - hopefully the final post for a few days - I think I nearly have my system working. I have one last questions, maybe someone could give me a few ideas. I'm just looking for some design suggestions. The background to my problem is as follows. I currently have a GinaStub that runs under the context of the LocalSystem, in time though, this will be replaced with a service. In either case, the system controls access to a given computer and controls what can be done on that computer, based on the logged on user. When a user logs on, a system tray icon / application is launched based on the [HKLM] Run registry key. When a user double-clicks on this icon, an IPC message is sent to the GinaStub / Service which then uses CreateProcessAsUser to launch a configuration application. This system all works fine and seems to hold water with Fast-User switching. However, I now have a small issue. Firstly, I want to ensure that only one occurrence of this Control application is launched per logged on user. As it stands, if a double-click on the icon more than once, I get another occurrence of the control app launched. I don't think that I can use the normal mutex system for ensuring single occurrence because this mutex may have been created by a control app on another users desktop. Does this make any sense? Does anyone have any suggestions? Cheers, Mike C
Technical Details
Message-ID:
<4809401f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7e9dc52f60c5b5d,start X-Google-Attributes: gid10cc67,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Mike Collins" <its@TheBottomOfThePost> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Ensuring single occurance with CreateProcessAsUser and FUS Date: Sat, 19 Apr 2008 01:53:52 -0000 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.3959 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 NNTP-Posting-Host: 89.241.69.122 Message-ID: <4809401f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1208565791 89.241.69.122 (18 Apr 2008 17:43:11 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!news.isoc.lu!newsgroups.borland.com!not-for-mail