internal static Boolean NoLocks(IClass theLockClass)
{
Boolean Result = false;
ISchemaLock theLock;
ISchemaLockInfo oneLock;
IEnumSchemaLockInfo allLocks;
try
{
theLock = (ISchemaLock)theLockClass;
theLock.GetCurrentSchemaLocks(out allLocks);
allLocks.Reset();
oneLock = allLocks.Next();
oneLock = allLocks.Next();
if (oneLock != null)
Result = false;
else { Result = true; }
if (Result) { theLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock); }
}
catch { Result = false; }
return Result;
}