🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.deployment
Article #338

Re: Access Violation Error when calling .exe using "spawnl" command

#338
From: Kelly Domalik
Date: Tue, 31 Aug 2004 04:44
23 lines
1640 bytes
Use the ShellExecute Windows API function...it always works.


"Harsha Rao" <harsha@ti.com> wrote in message
news:412f4bcb$1@newsgroups.borland.com...
>
> I am having a C++ Builder 6 program that calls diffent exe's from the main
form. If i call these exe's on any button press, I get a OS Access
Violation.
> I am using the following line to call the exe.
> spawnl(P_NOWAIT,"Sample.exe",NULL);
>
> I DO NOT want to use system command since it opens up a command window.
>
> Strangely the spawnl command works when i use menu items on the same form
and call them on menu press and DOES NOT WORK when  using any events on the
form.
>
> Please Help
> Harsha
> Texas Instruments
> harsha@ti.com
>
Technical Details
Message-ID: <41340219$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!prodigy.com!atl-c02.usenetserver.com!news.usenetserver.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <412f4bcb$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f8e54,de1dac67b3658e3b
X-Google-Attributes: gidf8e54,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kelly Domalik" <kel@progplace.com>
Newsgroups: borland.public.cppbuilder.deployment
References: <412f4bcb$1@newsgroups.borland.com>
Subject: Re: Access Violation Error when calling .exe using "spawnl" command
Date: Mon, 30 Aug 2004 23:44:24 -0500
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 65.29.23.194
Message-ID: <41340219$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1093927449 65.29.23.194 (30 Aug 2004 21:44:09 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!prodigy.com!atl-c02.usenetserver.com!news.usenetserver.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail