C Examples: DbiGetSysInfo

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiGetSysInfo

Return to chapter overview

Get system information.

If SysCfg is not NULL, a string is also returned containing system information. This example uses the following input:
         fDbiGetSysConfig(&SysInfo, Buffer);

DBIResult fDbiGetSysInfo(pSYSInfo pSysInfo, pCHAR SysInfo)

{

   DBIResult   rslt;

   rslt = Chk(DbiGetSysInfo(pSysInfo));

   if (rslt == DBIERR_NONE)

   {

      if (SysInfo != NULL)

        wsprintf(SysInfo, "Buffer Space: %d, Heap: %d, Drivers: %d, Clients: %d, "

            "Sessions: %d, Databases: %d, Cursors: %d", pSysInfo->iBufferSpace,

            pSysInfo->iHeapSpace, pSysInfo->iDrivers, pSysInfo->iClients,

            pSysInfo->iSessions, pSysInfo->iDatabases, pSysInfo->iCursors);

   }

   return rslt;

}