🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Service spawns Process - EnumWindows problem

#1594
From: Bob Gonder
Date: Fri, 20 Jul 2007 15:49
25 lines
1826 bytes
Paul wrote:

Please don't start messages with "-" as it strips the rest of the message from replys.


>1. EnumWindows does not have this process id in the list returned when
>trying to get the new window handle to use, so no messaging is possible
>withou a valid handle.

The window hasn't been created yet so Enum won't find it.

>2.Manually entering the windows handle of the restarted process into
>the guardian and using PostMessage - The restarted process does not see
>the message.

Probably the wrong handle.
Unless RegisterWindowMessage is messing up.

>Anyone have some clues on what I am doing wrong ?

Pass the starter's (service or guardian) handle (converted to text) to the Application on
the commandline and wait for it to contact you with the  registered message.  It can place
it's own handle in the message. Eliminates enum.

(BTW, who guards the guardian?)
Technical Details
Message-ID: <v2l1a31tv57k9blue1l65b0a64cmq4te7e@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46a0a522$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b7dc9abb756c9528
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Service spawns Process - EnumWindows problem
Date: Fri, 20 Jul 2007 08:49:48 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <v2l1a31tv57k9blue1l65b0a64cmq4te7e@4ax.com>
References: <46a0a522$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.85.190
X-Trace: newsgroups.borland.com 1184946584 69.69.85.190 (20 Jul 2007 08:49:44 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail