🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

using WTSGetActiveConsoleSessionId()

#451
From: Mike Collins
Date: Thu, 17 Apr 2008 14:13
16 lines
1512 bytes
Hay guys, hope everyone is well.

Can anyone point me in the right direction here.  I'm trying to launch an 
application on the active users desktop from a service.

I'm looking at a code snippet from MSDN that uses WTSQueryUserToken / 
WTSGetActiveConsoleSessionId to determine the active UI session.  Problem is 
that the compiler keeps telling me that WTSGetActiveConsoleSessionId() is an 
undefined function.  It's declared in winbase.h and i've included both 
windows.h and winbase.h but to no avail.

I'm using BCB 6 Enterprise...

many thanks in advance,

Mike 
Technical Details
Message-ID: <48074a72@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,61b1edc79d66af39,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: using WTSGetActiveConsoleSessionId()
Date: Thu, 17 Apr 2008 14:13:21 -0000
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.3959
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 78.144.108.240
Message-ID: <48074a72@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1208437362 78.144.108.240 (17 Apr 2008 06:02:42 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail