🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #597

Re: Start an app from a service under accout of current user

#597
From: Remy Lebeau (TeamB)
Date: Mon, 03 Mar 2008 20:10
18 lines
1766 bytes
"Robby Gebauer" <robby.gebauer@gmx.de> wrote in message 
news:47cc38d4$1@newsgroups.borland.com...

> I know this fuctions, but I don't know how to
> get the token of the current user.

That can be difficult to do from inside a service, especially on XP with 
Fast User Switching enabled, or on systems using Terminal Services (which 
FUS uses internally).  In a nutshell, you would have to locate a running 
process for the desired user (such as the Explorer.exe shell) and extract 
its token via OpenProcessToken().

I suggest you go to http://www.deja.com and search the newsgroup archives. 
This has been discussed in detail many times before.


Gambit 
Technical Details
Message-ID: <47cc5b25$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <47c96278$1@newsgroups.borland.com> <47cc349a$1@newsgroups.borland.com> <47cc38d4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,abe49adf1821d0de
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <47c96278$1@newsgroups.borland.com> <47cc349a$1@newsgroups.borland.com> <47cc38d4$1@newsgroups.borland.com>
Subject: Re: Start an app from a service under accout of current user
Date: Mon, 3 Mar 2008 12:10:40 -0800
Lines: 20
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 207.178.157.90
Message-ID: <47cc5b25$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1204575013 207.178.157.90 (3 Mar 2008 12:10:13 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail