CTSession::GetFirstActive() retrieves a database object pointer of the first active database. If the session contains no active databases, CTSession::GetFirstActive() returns NULL.
TOCIndex