# Test DosQuerySysInfo in OS/2 TAWK50 # Shows how to call functions in DOSCALLS (which isn't really a DLL) by number. # Usage: awkp -f qsv # Note: The names were clipped out of a Borland C include file. # It would be nice if a lot more of this were provided (as part of the TAWK # package), such as the funny numbers associated with the functions and the # various other parameters that are normally provided by the C include files. # Copyright 1997, Doug Dougherty - all rights granted to copy/do whatever # you want with this. # Email: dougherty-doug@norcmail.uchicago.edu # define QSV_MAX 23 extern system dll "DOSCALLS" name "#348" DosQuerySysInfo(unsigned long,unsigned long,void *,unsigned long) BEGIN { t = strdup(" ",23*4) DosQuerySysInfo(1,23,addressof(t),23*4) unpack("QSV_MAX_PATH_LENGTH@L" \ "QSV_MAX_TEXT_SESSIONS@L" \ "QSV_MAX_PM_SESSIONS@L" \ "QSV_MAX_VDM_SESSIONS@L" \ "QSV_BOOT_DRIVE@L" \ "QSV_DYN_PRI_VARIATION@L" \ "QSV_MAX_WAIT@L" \ "QSV_MIN_SLICE@L" \ "QSV_MAX_SLICE@L" \ "QSV_PAGE_SIZE@L" \ "QSV_VERSION_MAJOR@L" \ "QSV_VERSION_MINOR@L" \ "QSV_VERSION_REVISION@L" \ "QSV_MS_COUNT@L" \ "QSV_TIME_LOW@L" \ "QSV_TIME_HIGH@L" \ "QSV_TOTPHYSMEM@L" \ "QSV_TOTRESMEM@L" \ "QSV_TOTAVAILMEM@L" \ "QSV_MAXPRMEM@L" \ "QSV_MAXSHMEM@L" \ "QSV_TIMER_INTERVAL@L" \ "QSV_MAX_COMP_LENGTH@L",t,stuff) for (i in stuff) print i,stuff[i] }