Article View: borland.public.cppbuilder.nativeapi
Article #16514R: WinExec problem
From: Steve
Date: Mon, 12 May 2003 09:24
Date: Mon, 12 May 2003 09:24
25 lines
1800 bytes
1800 bytes
>
> 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:
<3ebf685c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.news2me.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ebf64d6@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 02:51:37 PST Reply-To: "Steve" <steve_alettoANTI@SPAMhotmail.com> From: "Steve" <steve_alettoANTI@SPAMhotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ebf64d6@newsgroups.borland.com> Subject: R: WinExec problem Date: Mon, 12 May 2003 11:24:21 +0200 Lines: 27 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: 80.105.101.132 Message-ID: <3ebf685c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1052731484 80.105.101.132 (12 May 2003 02:24:44 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.news2me.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail