home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4815 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.2 KB

  1. Path: sparky!uunet!munnari.oz.au!asgard!gsl
  2. From: gsl@mlb.dmt.csiro.au (Geoff Lamb)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Running DOS app with command line options
  5. Message-ID: <36@hymir.mlb.dmt.csiro.au>
  6. Date: 11 Jan 93 05:30:12 GMT
  7. Organization: CSIRO Division of Manufacturing Technology, Melbourne, Australia
  8. Lines: 26
  9.  
  10.  
  11. I would like make my windows program run the following DOS command :
  12.  
  13.     rsh %1 "sendmail %2 %3 %4" < %5
  14.  
  15. I have created a batch file with this command and a pif file to run it.
  16.  
  17. My problem is that I can get the thing to run using WinExec() with no command
  18. line options (the %1's ) but I can't see how I can get the command options in.
  19. I have tried the LoadModule() function but it apparently only likes true Windows
  20. programms and not pif's.
  21.  
  22. Does anyone out there know how I can get the command line options to work? 
  23.  
  24. Any suggestion would be apprieciated (Any suggestions on how to improve my 
  25. spelling might help too :-) )
  26.  
  27. Thanks in advance
  28. Geoff Lamb
  29.  
  30.  
  31. -- 
  32. Geoff Lamb, CSIRO Div of Manufacturing Tech,     Phone: +61 3 487 9295
  33. Locked Bag No. 9, Preston, Vic, 3072, Australia. Fax: +61 3 484 0878
  34. Internet: gsl@mlb.dmt.csiro.au                  
  35. Segmentation fault (core dumped)
  36.