我有以下代码,由于某种原因不断抛出此错误:尝试引用不存在的令牌。 (HRESULT异常:0x800703F0)
private bool LockVolume(SafeFileHandle handle)
{
int byteReturned;
const uint FSCTL_LOCK_VOLUME = 0x00090018;
if (DeviceIoControl(handle, FSCTL_LOCK_VOLUME, null, 0, null, 0, out byteReturned, IntPtr.Zero))
{
return true;
}
else
{
// Failed to gain a lock.
Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
return false;
}
}
任何有关此锁定失败的想法都将非常感谢!