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> dosgetsegdesc()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DosGetSegDesc()
------------------------------------------------------------------------------
 Purpose:
 Get the descriptor structure of a segment selector.

 Syntax:
 USHORT BLXAPI DosGetSegDesc(SEL selector, PDESC segdesc);

 Parameters:
 selector  A valid selector number whose descriptor is required.
 segdesc   Pointer to a DESC structure (see below) to receive the descriptor.

 Returns:
 Simplified segment descriptor containing the segment's base address,
 length and attributes as defined in the BLX286.H header file.

 Description:
 This function is used to obtain all the information about a particular
 selector.

 Example:
 #include <stdlib.h>                                                         
 #include <stdio.h>                                                          
 #include <string.h>                                                         
 #include <blx286.h>                                                         
                                                                             
 void main (void)                                                            
 {                                                                           
 DESC segdesc;                                                               
                                                                             
 if (DosGetSegDesc(SELECTOROF(main),&segdesc) == 0)                          
    {                                                                        
    printf ("Current code segment base address is %08Xh\n",                  
       segdesc.segbase);                                                     
    printf ("Current code segment length is %08Xh\n",                        
       segdesc.seglen);                                                      
    printf ("Current code segment attributes are %04Xh\n",                   
       segdesc.segattrib);                                                   
    }                                                                        
 }                                                                           

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