Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> dosgethostmode()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosGetHostMode()
------------------------------------------------------------------------------
 Purpose:
 Get the current DOS extender host mode (DPMI, VCPI, XMS).

 Syntax:
 USHORT BLXAPI DosGetHostMode(BYTE __far *hostmode);

 Parameters:
 hostmode  Pointer to a byte to receive the host mode.

 Returns:
 Host mode indicator byte.

 Description:
 This function is used to determine under which host mode the DOS extended
 program is running.

 Example:
 #include <stdlib.h>                                                         
 #include <stdio.h>                                                          
 #include <string.h>                                                         
 #include <blx286.h>                                                         
                                                                             
 void main (void)                                                            
 {                                                                           
 BYTE hostmode ;                                                             
                                                                             
 if(DosGetHostMode(&hostmode) == 0 )                                         
    {                                                                        
    printf("The host mode is ");                                             
    switch(hostmode)                                                         
       {                                                                     
       case BliHostDPMI :                                                    
          printf("DPMI");                                                    
          break;                                                             
       case BliHostVCPI :                                                    
          printf("VCPI");                                                    
          break;                                                             
       case BliHostXMS :                                                     
          printf("XMS");                                                     
          break;                                                             
       default :                                                             
          printf("Unknown!!");                                               
       }                                                                     
    }                                                                        
 }                                                                           

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson