🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to start App from within service

#9071
From: Remy Lebeau (TeamB)
Date: Thu, 12 Aug 2004 08:10
19 lines
1719 bytes
"Vladimir Stefanovic" <spam@not.needed> wrote in message
news:411b1d40$1@newsgroups.borland.com...

> In fact, in both cases the application was
> started (that can be seen in the list of tasks)
> but when the service is not interactive the
> form is not shown at all (the same is for
> CreateProcess() ).

The new process is started in the context of the user account, desktop, and
workstation as the calling thread.  Services, even interactive ones, do not
normally run under the context of the same desktop that the user visually
interacts with.  Thus the spawned process is not viewable when spawned from
a server.  As such, try calling SetProcessWindowStation() and
SetThreadDesktop() before calling ShellExecute() or CreateProcess().


Gambit
Technical Details
Message-ID: <411b25b8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <411a1f8b@newsgroups.borland.com> <411a5433$1@newsgroups.borland.com> <411b1d40$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f682bd6ac625431d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <411a1f8b@newsgroups.borland.com> <411a5433$1@newsgroups.borland.com> <411b1d40$1@newsgroups.borland.com>
Subject: Re: How to start App from within service
Date: Thu, 12 Aug 2004 01:10:15 -0700
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <411b25b8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1092298168 68.69.17.41 (12 Aug 2004 01:09:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail