Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:dosgetinfoseg [2021/10/16 14:24] – created prokushev | en:docs:fapi:dosgetinfoseg [2021/12/16 03:04] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | |||
+ | ====== DosGetInfoSeg ====== | ||
This call returns the address of a global and local information segment, specific to a process. | This call returns the address of a global and local information segment, specific to a process. | ||
- | ==Syntax== | + | ===== Syntax ===== |
| | ||
- | ==Parameters== | + | ===== Parameters ===== |
- | ;GlobalSeg (PSEL) - output : Address of the global information segment structure, as defined below: | + | |
- | :time (ULONG): Time in seconds since 1/1/1970. | + | |
- | :millisecs (ULONG): Time in milliseconds. | + | |
- | :hours (UCHAR): Current hour. | + | |
- | :minute (UCHAR): Current minute. | + | |
- | :seconds (UCHAR): Current second. | + | |
- | :hundredsec (UCHAR): Current hundredth of a second. | + | |
- | :timezone (USHORT): Minutes from UTC; if hex FFFFH, timezone is undefined. | + | |
- | :interval (USHORT): Timer interval in tenths of milliseconds. | + | |
- | :day (UCHAR): Day. | + | |
- | :month (UCHAR): Month. | + | |
- | :year (USHORT): Year. | + | |
- | :weekday (UCHAR): Day-of-week: | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | : | + | |
- | : | + | |
- | :revision (UCHAR): Revision letter. | + | |
- | : | + | |
- | : | + | |
- | :hugeshift (UCHAR): Shift count for huge segments. | + | |
- | : | + | |
- | | + | |
- | | + | |
- | | + | |
- | : | + | |
- | :dynvarflag (UCHAR) : Dynamic variation flag: | + | |
- | | + | |
- | | + | |
- | | + | |
- | :maxwait (UCHAR) : Maximum wait in seconds. | + | |
- | : | + | |
- | : | + | |
- | :bootdrive (USHORT) : Drive from which the system was booted: | + | |
- | | + | |
- | | + | |
- | | + | |
- | . | + | |
- | . | + | |
- | . | + | |
- | | + | |
- | :traceflags (UCHAR): 32 system trace major code flags. Each bit corresponds to a trace major code, hex 00-FFH. The most significant bit (left-most) of the first byte corresponds to major code hex 00H. | + | |
- | | + | |
- | | + | |
- | Trace enabled. | + | |
- | : | + | |
- | : | + | |
- | ; | + | * GlobalSeg |
- | : | + | * time (ULONG): Time in seconds since 1/1/1970. |
- | : | + | * millisecs |
- | : | + | * hours (UCHAR): Current |
- | :threadid (TID): Current | + | * minute |
- | : | + | * seconds |
- | : | + | * hundredsec |
- | : | + | * timezone |
- | : | + | * interval |
- | : | + | * day (UCHAR): |
- | | + | * month (UCHAR): Month. |
- | | + | * year (USHORT): |
- | 1 Requires real mode. | + | * weekday |
- | | + | |
- | | + | |
- | | + | |
- | : | + | |
- | : | + | |
- | : | + | |
- | : | + | |
- | :stacksize (USHORT): Stack size in bytes. | + | |
- | :heapsize (USHORT): Heap size in bytes. | + | |
- | :hmodule (HMODULE): Module handle. | + | |
- | :dssel (SEL): Data segment selector. | + | |
- | ==Return Code== | + | ^ Value ^ Definition ^ |
- | ;rc (USHORT) - return: | + | | 0 | Sunday | |
- | * 0 NO_ERROR | + | | 1 | Monday | |
+ | | 2 | Tuesday | | ||
+ | | 3 | Wednesday | | ||
+ | | 4 | Thursday | | ||
+ | | 5 | Friday | | ||
+ | | 6 | Saturday | | ||
+ | |||
+ | * majorversion (UCHAR): Major version number. | ||
+ | * minorversion (UCHAR): Minor version number. | ||
+ | * revision (UCHAR): Revision letter. | ||
+ | * currentsession (UCHAR): Current foreground full-screen session. | ||
+ | * maxnumsessions (UCHAR): Maximum number of full-screen sessions. | ||
+ | * hugeshift (UCHAR): Shift count for huge segments. | ||
+ | * protmodeind (UCHAR): Protect-mode-only indicator: | ||
+ | |||
+ | ^ Value ^ Definition ^ | ||
+ | | 0 | DOS mode and OS/2 mode. | | ||
+ | | 1 | OS/2 mode only. | | ||
+ | |||
+ | * lastprocess (USHORT) : Process ID of the current foreground process. | ||
+ | * dynvarflag (UCHAR) : Dynamic variation flag: | ||
+ | |||
+ | ^ Value ^ Definition ^ | ||
+ | | 0 | Absolute | | ||
+ | | 1 | Enabled | | ||
+ | |||
+ | * maxwait (UCHAR) : Maximum wait in seconds. | ||
+ | * mintimeslice (USHORT) : Minimum timeslice in milliseconds. | ||
+ | * maxtimeslice (USHORT) : Maximum timeslice in milliseconds. | ||
+ | * bootdrive (USHORT) : Drive from which the system was booted: | ||
+ | |||
+ | ^ Value ^ Definition ^ | ||
+ | | 1 | Drive A. | | ||
+ | | 2 | Drive B. | | ||
+ | | . | | | ||
+ | | . | | | ||
+ | | . | | | ||
+ | | n | ||
+ | |||
+ | * [[traceflags]] (UCHAR): 32 system trace major code flags. Each bit corresponds to a trace major code, hex 00-FFH. The most significant bit (left-most) of the first byte corresponds to major code hex 00H. | ||
+ | |||
+ | ^ Value ^ Definition ^ | ||
+ | | 0 | Trace disabled. | | ||
+ | | 1 | Trace enabled. | | ||
+ | |||
+ | * maxtextsessions (UCHAR): Maximum number of VIO windowable sessions. | ||
+ | * maxpmsessions (UCHAR): Maximum number of Presentation Manager sessions. | ||
+ | |||
+ | * LocalSeg (PSEL) - output : Address of the selector for the local information segment structure, as defined below: | ||
+ | * processid (PID): Current process ID. | ||
+ | * parentprocessid (PID): Parent process ID. | ||
+ | * threadprty (USHORT): Priority of current thread. | ||
+ | * threadid (TID): Current thread ID. | ||
+ | * sessionid (USHORT): Current session ID. | ||
+ | * procstatus (UCHAR): Process status. | ||
+ | * unused (UCHAR): Unused. | ||
+ | * foregroundprocess (BOOL): Current process is in foreground (has keyboard focus). Value -1 implies yes, 0 implies no. | ||
+ | * typeProcess (UCHAR): Type of process: | ||
+ | |||
+ | ^ Value ^ Definition ^ | ||
+ | | 0 | Full screen protect mode session. | | ||
+ | | 1 | Requires real mode. | | ||
+ | | 2 | VIO windowable protect mode session. | | ||
+ | | 3 | Presentation Manager protect mode session. | | ||
+ | | 4 | Detached protect mode process. | | ||
+ | |||
+ | * unused (UCHAR): Unused. | ||
+ | * environmentsel (SEL): Environment selector. | ||
+ | * cmdlineoff (USHORT): Command line offset in the segment addressed by environmentsel. | ||
+ | * dataseglen (USHORT): Length of data segment in bytes. | ||
+ | * stacksize (USHORT): Stack size in bytes. | ||
+ | * heapsize (USHORT): Heap size in bytes. | ||
+ | * hmodule (HMODULE): Module handle. | ||
+ | * dssel (SEL): Data segment selector. | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc (USHORT) - return: | ||
+ | |||
+ | | ||
+ | |||
+ | ===== Remarks ===== | ||
- | ==Remarks== | ||
Items of general interest are kept in the global information segment. Items of information specific to a particular process are kept in the local information segment. This information can be directly read by the application program. Both of these segments are defined as read-only segments. The application program cannot modify this data. | Items of general interest are kept in the global information segment. Items of information specific to a particular process are kept in the local information segment. This information can be directly read by the application program. Both of these segments are defined as read-only segments. The application program cannot modify this data. | ||
Line 98: | Line 118: | ||
The application program should read all time and date fields it uses as quickly as possible. It can then compare the least significant time field it uses (milliseconds, | The application program should read all time and date fields it uses as quickly as possible. It can then compare the least significant time field it uses (milliseconds, | ||
- | ==Bindings== | + | ===== Bindings |
- | ===C=== | + | |
- | <PRE> | + | ====C==== |
+ | <code c> | ||
typedef struct _GINFOSEG { | typedef struct _GINFOSEG { | ||
ULONG | ULONG | ||
Line 160: | Line 181: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM=== | + | ====MASM==== |
- | <PRE> | + | <code asm> |
GINFOSEG struc | GINFOSEG struc | ||
gis_time | gis_time | ||
Line 223: | Line 244: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
+ | {{page> | ||