This call returns the address of a global and local information segment, specific to a process.
DosGetInfoSeg
GlobalSeg (PSEL) - output
time (ULONG)
Value
Value
Value
Value
Value
processid (PID)
Value
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.
Assuming n1, n2, and n3 are the maximum number of full-screen sessions, VIO-windowable sessions, and Presentation Manager sessions, the first 0 through (n1-1) session numbers are assigned to full-screen sessions. The next n2 session numbers are assigned to VIO-windowable sessions, and the next n3 session numbers are assigned to Presentation Manager sessions. Session numbers in the range (n1+n2+n3) through 255 are reserved. Applications should use (n1+n2+n3-1) as an upper boundary. Applications should not assume that all session numbers starting with (n1+n2) and higher are Presentation Manager sessions.
The application program must be careful when referencing the date or time fields in the global information segment. A timer interrupt can be received by the system in between the instructions that read the individual fields, changing the data in these fields. For example, if the time is currently 23:59:59 on Tuesday, 6/2/87, the program can read the hours field (23). A timer interrupt can now be received, changing the time to 00:00:00 on Wednesday, 6/3/87. The program reads the rest of the time field (0 minutes) and the date field. The program would then think the current time and date is 23:00:00 on Wednesday, 6/3/87, which is incorrect.
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, hundredths, seconds, or minutes) against the current value in the global information segment. If the value has not changed, the rest of the information is valid. If the value has changed, the program time or date information should be read again, as the information is updated while the program reads it.