| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Starting a child session in Pascal |
Hello Everybody,
I have a problem. No, actually I have two..
0) I am using SP/2 under Warp 4 (Not exactly a problem, more like information)
1) I am a newbie programming OS/2
2) I am trying to write a procedure that will start another program.
It compiles just fine, but produces a SYS3175 when run.
Why is it generating the SYS3175, and what am I doing wrong?
===============================================================================
Program TestingExec;
Uses BSEDos;
Function SynchExecSess(pgmTitle, pgmName :CString) :ApiRet;
Var psd :StartData;
sessID :ULong;
apid :PID;
objBuf :CString;
rc :ApiRet;
Begin
psd.aLength := SizeOf(StartData);
psd.Related := SSF_RELATED_CHILD;
psd.FgBg := SSF_FGBG_BACK;
psd.TraceOpt := SSF_TRACEOPT_NONE;
psd.pgmTitle := {at}pgmTitle;
psd.pgmName := {at}pgmName;
psd.pgmInputs := NIL;
psd.TermQ := NIL;
psd.Environment := NIL;
psd.InheritOpt := SSF_INHERTOPT_PARENT;
psd.SessionType := SSF_TYPE_DEFAULT;
psd.IconFile := NIL;
psd.pgmHandle := 0;
psd.pgmControl := SSF_CONTROL_VISIBLE | SSF_CONTROL_MAXIMIZE;
psd.InitXPos := 30;
psd.InitYPos := 40;
psd.InitXSize := 200;
psd.InitYSize := 140;
psd.Reserved := 0;
psd.ObjectBuffer := {at}objBuf;
psd.ObjectBuffLen := 100;
rc := DosStartSession(psd, sessID, apid);
If rc 0 Then ;
{ Implement proper error handling here }
SynchExecSess := rc;
End;
Begin
SynchExecSess('Just testing', 'E:\OS2\CMD.EXE');
End.
===============================================================================
regards, David
@EOT:
--- WarpStation four
* Origin: Welcome to Heaven Eleven (2:206/141)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 206/100 205/625 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.