dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosGetInfoSeg (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSINFOSEG
 
USHORT DosGetInfoSeg(pselGlobalSeg, pselLocalSeg)
PSEL pselGlobalSeg;    /* pointer to variable for global selector */
PSEL pselLocalSeg;     /* pointer to variable for local selector  */
 
The DosGetInfoSeg function retrieves segment selectors for the global and
local information segments. These read-only information segments contain
general information about the system and the process. The global information
segment is accessible to all processes. The local information segment is
accessible only to the current process.
 
Parameter      Description
────────────────────────────────────────────────────────────────────────────
 
pselGlobalSeg  Points to the GINFOSEG structure that contains global
               information.
 
pselLocalSeg   Points to the LINFOSEG structure that contains local
               information.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value.
 
Example
 
This example calls the DosGetInfoSeg function to retrieve the selector of a
system global segment, converts the segment selector into a pointer to a
structure, and determines whether the current day of the week is Monday:
 
SEL selGlobalSeg, selLocalSeg;
GINFOSEG FAR *pgis;
DosGetInfoSeg(&selGlobalSeg, &selLocalSeg);
pgis = MAKEPGINFOSEG(selGlobalSeg);
if (pgis->weekday == 1) {
    .
    . /* This code is executed only on Mondays. */
    .
 
See Also
 
DosGetDateTime, GINFOSEG, LINFOSEG