C Examples: DbiGetClientInfo

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiGetClientInfo

Return to chapter overview

Obtain client info:

If ClientStr is not null, this function also creates a string with the client information. This example uses the following input:
         fDbiGetClientInfo(&Client, Buffer);

DBIResult fDbiGetClientInfo(pCLIENTInfo pCInfo, pCHAR ClientStr)

{

   DBIResult   rslt;

   rslt = Chk(DbiGetClientInfo(pCInfo));

   if ((rslt == DBIERR_NONE) && (ClientStr != NULL))

      wsprintf(ClientStr, "Name: %s, Sessions: %d, Working Dir: %s, Language: %s",

         pCInfo->szName, pCInfo->iSessions, pCInfo->szWorkDir, pCInfo->szLang);

   return rslt;

}