Article View: borland.public.cppbuilder.nativeapi
Article #12688Re: ShellExecute Error
From: George
Date: Thu, 20 Nov 2003 23:58
Date: Thu, 20 Nov 2003 23:58
44 lines
2293 bytes
2293 bytes
Well the file is c:\\ ... i wrote C:\ in the newsgroups only. Can you please give me an example of this code in CreateProcess? I can't make it work to wait until finish. I already searched newgroups, i also found a post of you, that uses CreateProcess but it was a MINIMIZE/RESTORE example... Any help would be appreciated! George "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:3fbd525b$1@newsgroups.borland.com... > > "George" <george@nospam.org> wrote in message > news:3fbd4eec$1@newsgroups.borland.com... > > > ExecInfo.lpParameters = "--user=root --password=pass --database=data1 > > c:\output.txt"; > > You're missing a backslash in the filename: > > ExecInfo.lpParameters = "--user=root --password=pass --database=data1 > > c:\\output.txt"; > > > Everything works fine but that "> output.txt" seems to make it fail. > > By fail, are you referring to ShellExecute() itself returning FALSE, or just > that it does succeed but does not produce the file? > > > If I put all the command as it is inside a bat file and I execute > > with the above way, everything looks fine. > > An alternative would be to use CreateProcess() instead so that you can > provide your own STDOUT and STDERR handles and pipe the output to the > desired file yourself manually. > > > Gambit > >
Technical Details
Message-ID:
<3fbd535a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fbd4eec$1@newsgroups.borland.com> <3fbd525b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,9b656969a1fc70df X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-20 16:10:01 PST From: "George" <george@nospam.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fbd4eec$1@newsgroups.borland.com> <3fbd525b$1@newsgroups.borland.com> Subject: Re: ShellExecute Error Date: Fri, 21 Nov 2003 01:58:41 +0200 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 212.205.250.182 Message-ID: <3fbd535a@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069372250 212.205.250.182 (20 Nov 2003 15:50:50 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail