Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Return the default session path.


CTDBRET ctdbGetSessionPath(CTHANDLE Handle, pTEXT Path,

VRLEN PathSize)


ctdbGetSessionPath() returns the session path that is stored in the session handle. Note that the returned session path will be empty unless you have previously called ctdbSetSessionPath() with that session handle. Use ctdbSetSessionPath() to set the session path.

  • Handle [in] the session handle.
  • Path [out] the pointer to a C string where the session path is returned.
  • PathSize [in] the Path size in bytes. If Path is not large enough to hold the session path, the error CTDBRET_ARGSMALL (4006) is returned.


ctdbGetSessionPath() returns CTDBRET_OK if successful, or the c-tree Plus error code on failure, or CTDBRET_ARGSMALL (4006) if the Path is not large enough to hold the session path.


eRet = ctdbLogon(handle, "FAIRCOMS", "ADMIN", "ADMIN");

eRet = ctdbGetSessionPath(handle, ses_path, sizeof(ses_path));

See also