DbRetVal OpenLogCursor(LogCursor logc, int flags) {
   DbRetVal ret;
   RuntimeHelpers.PrepareConstrainedRegions();
   try { }
   finally {
     DB_LOGC* logcp;
     DB_ENV* evp = CheckDisposed();
     ret = evp->LogCursor(evp, out logcp, unchecked((UInt32)flags));
     if (ret == DbRetVal.SUCCESS) {
       logc.Initialize(logcp);
       logCursors.Insert(logc);
     }
   }
   return ret;
 }
 public LogCursor OpenLogCursor() {
   LogCursor logc = new LogCursor(this);
   DbRetVal ret;
   // lock environement first, to avoid deadlocks
   lock (rscLock) {
     ret = OpenLogCursor(logc, 0);
   }
   Util.CheckRetVal(ret);
   return logc;
 }
 // requires synchronization lock on rscLock
 internal bool RemoveLogCursor(LogCursor logc) {
   return logCursors.Remove(logc);
 }