| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | DosStartSession rc=191 for DOS |
Hi,
I'm using DosStartSession to launch programs the user wants. Here's my class:
APIRET Launch::Start(HWND hwnd, PSZ Executable, PSZ Title)
{
sdata.Length = sizeof(sdata);
sdata.Related = 1;
sdata.FgBg = 0;
sdata.TraceOpt = 0;
sdata.PgmTitle = Title;
sdata.PgmName = Executable;
sdata.PgmInputs = (unsigned char *)"RENDER.INI";
sdata.TermQ = NULL;
sdata.Environment = NULL;
sdata.InheritOpt = 1;
sdata.SessionType = 2;
sdata.IconFile = NULL;
sdata.PgmHandle = 0;
sdata.PgmControl = 3;
sdata.InitXPos = 0;
sdata.InitYPos = 0;
sdata.InitXSize = 0;
sdata.InitYSize = 0;
sdata.ObjectBuffer = (unsigned char *)buffer;
sdata.ObjectBuffLen = sizeof((unsigned char *)buffer);
rc = DosStartSession(&sdata,&session,&pid);
if (rc != 0)
{
sprintf((char *) ERRORBUF,"An error occured while trying to
start program. DosStartSession return error = %u",rc);
WinMessageBox(HWND_DESKTOP,hwnd, (const unsigned char *)ERRORBUF,
(PSZ)"Rayzor Editor/2 : ERROR",0,MB_OK | MB_CUACRITICAL);
}
}
Here, if the program (Executable) is a DOS program, the program returns an
error 191 for rc (the ERRORBUF messagebox). It works find for OS/2
Text-Mode apps. Oh, and all I plan on doing is launching Text-Mode
sessions (that's what is recommended).
--- Maximus/2 3.00
* Origin: One Less Car * TorontOS/2 * (416) 480-0147 * (1:250/238)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 250/238 2424/11 10 396/1 270/101 712/515 711/808 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™.