🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
2 messages
2 total messages Started by Brian Jay Gould Tue, 29 Jan 1991 02:54
Help using DosStartSession and error status (please)
#2379
Author: Brian Jay Gould
Date: Tue, 29 Jan 1991 02:54
22 lines
1327 bytes
In the past I've use DosExecPgm to start another program, but now
I need to keep it as a child process.  DosStartSession is very 
poorly documented.  Any ideas on what to put in Environment and
TermQ?

I'm getting a status return of 4367 and can't find any information
on it in any documentation.  Any help?

Do you put the .exe extension on the program name?  Will the path
environment variable be used, or must the file be explicitly used?

Any help. (or a program-segment as an example) would be greatly
appreciated.

Thanks.
-- 
--
Any disclaimers made for me, by me, or about me - may or may not accurately
reflect my failure to be reflecting the opinions of myself or anyone else.
*************************************************
*  Brian Jay Gould - Professional Brain-stormer *
*************************************************
Re: Help using DosStartSession and error status (please)
#2381
Author: Alan Ballard
Date: Wed, 30 Jan 1991 07:04
42 lines
2281 bytes
In article <Jan.28.21.54.02.1991.6554@pilot.njin.net> gould@pilot.njin.net (Brian Jay Gould) writes:
>In the past I've use DosExecPgm to start another program, but now
>I need to keep it as a child process.  
>I'm getting a status return of 4367 and can't find any information
>on it in any documentation.  Any help?

This doesn't seem to be a valid error code according to the header files. 
Are you sure you're displaying it correctly?

The following is a fragment of code that provides a simple 
example of the use of DosStartSession.
 
/*
 * Start the specified program as a separate, unrelated, background
 * session. 
 *
 * Parameters are name of program, which must include extension and must
 * either be in the search path or include fully specified path, and
 * argument string to pass to it.  Argument string may be specified as 
 * NULL, otherwise it a single 0-terminated string constituting the 
 * "tail" of a command line for the program.
 */
void FAR
StartSession(NPSZ npszName, PSZ pszArgs)
   STARTDATA       stdata;
   USHORT          idSession;
   int             rc;

   WtiLFillStruct(&stdata, sizeof(stdata), 0);  /* zero-fill the struct */
   stdata.Related = FALSE;
   stdata.Length = sizeof(stdata);
   stdata.FgBg = TRUE;
   stdata.PgmName = npszName;
   stdata.PgmInputs = pszArgs;

   if (rc = DosStartSession(&stdata, &idSession, &pid)) 
      fprintf(stderr, "rc=%d from DosStartSession\n", rc);
}
Alan Ballard                   | Internet: ballard@ucs.ubc.ca
University Computing Services  |   Bitnet: USERAB1@UBCMTSG
University of British Columbia |    Phone: 604-228-3074
Vancouver B.C. Canada V6R 1W5  |      Fax: 604-228-5116
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads