Article View: borland.public.cppbuilder.nativeapi
Article #16523R: WinExec problem
From: Enrico B.
Date: Mon, 12 May 2003 13:55
Date: Mon, 12 May 2003 13:55
36 lines
1966 bytes
1966 bytes
I used ShellExecute.
Thank you for your time.
Henry
Steve <steve_alettoANTI@SPAMhotmail.com> wrote in message
3ebf685c@newsgroups.borland.com...
> >
> > I need to launch, from my program, another application. I
> tried the
> > following instruction:
> >
> > WinExec("C:/vvoce/vvoce.exe", SW_SHOWDEFAULT);
> >
> > The problem: the external application launched this way
> does not function
> > correctly, because the working directory appears to be the
> directory of my
> > program, not the directory of the external application. If
> I run that
> > application by double clicking its link on my desktop, the
> application works
> > correctly. So: is there a way to programmatically emulate
> a double click on
> > the icon (link) that launches that application?
>
> You could use CreateProcess instead. There, you can specify
> the working directory for the child process.
>
> HTH,
>
> Steve.
>
>
Technical Details
Message-ID:
<3ebfa455@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ebf64d6@newsgroups.borland.com> <3ebf685c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,693f170cbcb1b384 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-12 06:48:07 PST Reply-To: "Enrico B." <eangelo@libero.it> From: "Enrico B." <eangelo@libero.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ebf64d6@newsgroups.borland.com> <3ebf685c@newsgroups.borland.com> Subject: R: WinExec problem Date: Mon, 12 May 2003 15:55:57 +0200 Lines: 38 Organization: Idinet X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 212.38.42.168 Message-ID: <3ebfa455@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052746837 212.38.42.168 (12 May 2003 06:40:37 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail