TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dmitry M Golubovsky
from: hugo landsman
date: 1996-12-18 21:39:04
subject: DosStartSession rc=191 f

hi Dmitry,

 DMG> I have found that under TSHELL, DOS executables cannot be run by
 DMG> "start" command (that appears to call DosStartSession) but under
 DMG> PM environment, they can be run. Where is the difference and how
 DMG> can I run realmode EXE under TSHELL?

The difference is in the size of the structure: in a non-PM environment,
the Length field should be set to 32.  O, and you cannot start windowed
sessions either...

   rc = DosStartSession(&sdata,&newSID,&newPID);
		
   /* if PM not loaded... */
   if (ERROR_SMG_INVALID_DATA_LENGTH == rc)
   {
      doPM = 0;
      switch (sdata.SessionType)
      {
          case SSF_TYPE_FULLSCREEN:
	  case SSF_TYPE_VDM:
               break;
	  case SSF_TYPE_WINDOWEDVDM:
               sdata.SessionType = SSF_TYPE_VDM;
               break;
          default:
               sdata.SessionType = SSF_TYPE_DEFAULT;
               break;
     }
     sdata.Length = 32;
     rc = DosStartSession(&sdata,&newSID,&newPID);
  }


groetjes,
	  hugo
--
E-mail: huug{at}poboxes.com
* Origin: Yet Another Nightfly Point (2:283/608.5)
SEEN-BY: 270/101 711/401 409 410 413 430 808 809 934 955 712/407 515 624 628
SEEN-BY: 713/317
@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™.