Jump to content

KernLISData

From EDM2
Revision as of 00:03, 29 December 2022 by Martini (talk | contribs)

Dereferences to the linear address pointing to the local info segment.

Is the equivalent of what DosHelp_GetDOSVar returns for index DHGETDOSV_LOCINFOSEG.

The _KernLISData global variable is a pointer to a data structure that contains information about the OS/2 kernel's Loader Interface Segment (LIS). The LIS is a data structure that is used by the kernel to store information about the operating system and its components, including the kernel itself, device drivers, and other system modules. The _KernLISData variable is a 4-byte value that is stored in memory and is used by the kernel and by other parts of the operating system to access the LIS. It is often used by programs to access information about the operating system and its components, such as the version numbers of the kernel and other system modules.


AI Generated

KernLISData is a global variable in the OS/2 operating system that is a pointer to a data structure that contains information about the OS/2 kernel's Loader Interface Segment (LIS). The LIS is a data structure that is used by the kernel to store information about the operating system and its components, including the kernel itself, device drivers, and other system modules.

The KernLISData variable is a 4-byte value that is stored in memory and is used by the kernel and by other parts of the operating system to access the LIS. It is often used by programs to access information about the operating system and its components, such as the version numbers of the kernel and other system modules.

Here is the definition of the KernLISData variable:

PLISDATA KernLISData;

The KernLISData variable is a pointer to a LISDATA structure, which is typically defined as follows:

typedef struct _LISDATA {
   ULONG LISVersion;
   ULONG LISRevision;
   PLISDATA NextLIS;
   PLISDATA PrevLIS;
   ULONG LISSize;
   ULONG LISNameLength;
   CHAR LISName[1];
} LISDATA, *PLISDATA;

The LISVersion and LISRevision fields contain the version and revision numbers of the LIS. The NextLIS and PrevLIS fields are pointers to the next and previous LIS data structures in a linked list of LIS data structures. The LISSize field indicates the size of the LIS data structure, and the LISNameLength field indicates the length of the LISName field, which contains the name of the LIS.

Here is an example of how the KernLISData variable might be used in a program:

#include <os2.h>
#include <stdio.h>

int main() {
   // Print the LIS version and revision numbers
   printf("LIS version: %u\n", KernLISData->LISVersion);
   printf("LIS revision: %u\n", KernLISData->LISRevision);

   return 0;
}

In this example, the KernLISData variable is used to access the LISVersion and LISRevision fields of the LIS data structure. The values of these fields are printed to the console using the printf function.