|
<< Click to Display Table of Contents >> C Examples: DbiGetSesInfo |
![]() ![]()
|
Get session information.
If SesInfo is not NULL, a string is also returned containing session information. This example uses the following input:
fDbiGetSesInfo(&Sesinfo, Buffer);
DBIResult fDbiGetSesInfo(pSESInfo pSesInfo, pCHAR SesInfo)
{
DBIResult rslt;
rslt = Chk(DbiGetSesInfo(pSesInfo));
if (rslt == DBIERR_NONE)
{
if (SesInfo != NULL)
wsprintf(SesInfo, "ID: %d, Name: %s, Open DB: %d, Open Cursors: %d, "
"Lock Wait: %d, Net Dir: %s, Private Dir: %s", pSesInfo->iSession,
pSesInfo->szName, pSesInfo->iDatabases, pSesInfo->iCursors,
pSesInfo->iLockWait, pSesInfo->szNetDir, pSesInfo->szPrivDir);
}
return rslt;
}