C Examples: DbiGetCurrSession

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiGetCurrSession

Return to chapter overview

Return the handle associated with the current session:  

This function returns the handle of the current session. If pSesInfo is not null, DbiGetCurrSession retrieves session information. This example uses the following input:
         fDbiGetCurrSession(&hSes, &SesInfo);

DBIResult fDbiGetCurrSession(phDBISes pTmpSes, pSESInfo pSesInfo)

{

  DBIResult      rslt;

  rslt = Chk(DbiGetCurrSession(pTmpSes));

  if (rslt == DBIERR_NONE)

  {

     if (pSesInfo != NULL)

        rslt= Chk(DbiGetSesInfo(pSesInfo));

  }

  return rslt;

}