TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Gautam Lad
from: hugo landsman
date: 1996-12-11 13:30:28
subject: DosStartSession rc=191 for DOS

hi Gautam,

 GL> I'm using DosStartSession to launch programs the user wants. 
 GL> Here's my class:
 GL> APIRET Launch::Start(HWND hwnd, PSZ Executable, PSZ Title)
 GL> {
 GL> sdata.Length = sizeof(sdata);
 GL> sdata.Related = 1;
 GL> sdata.FgBg = 0;
 GL> sdata.TraceOpt = 0;
 GL> sdata.PgmTitle = Title;
 GL> sdata.PgmName = Executable;
 GL> sdata.PgmInputs = (unsigned char *)"RENDER.INI";
 GL> sdata.TermQ = NULL;
 GL> sdata.Environment = NULL;
 GL> sdata.InheritOpt = 1;
 GL> sdata.SessionType = 2;

  SessionType (USHORT) 
     The type of session that should be created for this program. 

     The values of this field are shown in the list below: 

     0        SSF_TYPE_DEFAULT 
              Use the PgmHandle data, or allow the Shell to establish the session 
type. 

     1        SSF_TYPE_FULLSCREEN 
              Start the program in a full-screen session. 

     2        SSF_TYPE_WINDOWABLEVIO 
              Start the program in a windowed session for programs using the Base 
Video Subsystem. 

     3        SSF_TYPE_PM. 
              Start the program in a windowed session for programs using the 
Presentation Manager 
              services (including AVIO calls). 

     4        SSF_TYPE_VDM 
              Start the program in a full-screen DOS session. 

     7        SSF_TYPE_WINDOWEDVDM 
              Start the program in a windowed DOS session. 

(there are more of 'm, but not in my old docs: mostly WinOS2 ones).
2 is incorrect for a DOS program.  Try 4 or 7 when DosQueryAppType sais
it's a DOS app, 
or let the OS guess at it (0).

groetjes,
	  hugo
--
E-mail: huug{at}poboxes.com
* Origin: Yet Another Nightfly Point (2:283/608.5)
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: 283/608 6 1 280/801 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™.