Re: Launching Another Executable from my Program (Borland C++)



In article <bf961100-b674-40fe-8ec9-e64d52489454@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
davidmurray1@xxxxxxxxx writes:

I have a C++ DOS app that I made in Borland... I want to launch a
console application (with command line arguments) from my program
(presumably using ShellExecute), but when I make the call, Borland
says it can't find the necessary DLLs. I pulled the DLLs from my XP
machine, but it didn't fix the problem.

Is there a quick and dirty way to launch a console application (with
command line args) from a DOS C++ app?

I don't want to spend a lot of time on something so rudimentary
because I am under deadline. I've currently switched my focus to
another part of the program and left this on hold.

for example: the call from cmd prompt (once in the correct directory)
would be: LWhiz example.jpg

LWhiz is an image viewing application that will open the jpg
specified... this is what i want to do from my application.

You don't say which version of BCC you're using, but if it's for
DOS it shouldn't matter too much. Have you tried one of the many
execXX() functions? Or even system()? For example something
like this ought to work:

system ("cmd.exe /c LWhiz example.jpg");

Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
.



Relevant Pages

  • Re: Ive never seen that message but Im guessing thatyou may be dealing with the
    ... If I can do a job with a single-line command ... By the way, DOS? ... I never said that attrib.exe as a console command was better - ... If I boot to Win98 and open a "console" window it's ...
    (microsoft.public.scripting.vbscript)
  • Re: tcl command "type"
    ... i agree about DOS and the effects of "type". ... In his post Alan Anderson tells me: ... >command, so it should work if you type it to the console. ...
    (comp.lang.tcl)
  • Re: Batch file (CMD) output into HTA
    ... be a group for console operations, ... types who like to use command line operations. ... are also using VBS and just don't know where else ... I open a console window on Win9x it's DOS. ...
    (microsoft.public.scripting.vbscript)
  • Re: Change File Attributes
    ... In DOS, yes. ... detail the DOS method, and point out why you think ... I never said that attrib.exe as a console command was better - ...
    (microsoft.public.scripting.vbscript)
  • Re: Why is network reading slow?
    ... I am using the DOS command prompt's copy command. ... why such an incredibly tiny buffer? ... DWORD nTotal = 0; ...
    (microsoft.public.vc.mfc)