OS2_PM_DRV_QUERYSCREENRESOLUTIONS allows the operating system to display to the user the display modes that are supported by the display driver.
#include <os2.h>
PVOID     pBuf;    /*  Pointer to the output buffer. */
PULONG    pcbBuf;  /*  Pointer to the number of bytes in the buffer. */
LONG      rc;      /*  Return codes */
rc = OS2_PM_DRV_QUERYSCREENRESOLUTIONS(
      pBuf, pcbBuf);