!----------------------------------
! LockVolume
!----------------------------------

integer function LockVolume( hDisk )
use dfwin
integer hDisk

integer ReturnedByteCount
LockVolume = DeviceIoControl(                                     &
                hDisk,                                            &
                 INT4(FSCTL_LOCK_VOLUME),                         &
                 NULL,                                            &
                 0,                                               &
                 NULL,                                            &
                 0,                                               &
                 LOC(ReturnedByteCount),                          &
                 NULL_overlapped                                  &
                 )
return
end

!----------------------------------
! UnLockVolume
!----------------------------------
integer function UnlockVolume(hDisk)
use dfwin
integer hDisk


integer ReturnedByteCount
UnlockVolume = DeviceIoControl(                                   &
                 hDisk,                                           &
                 INT4(FSCTL_UNLOCK_VOLUME),                       &
                 NULL,                                            &
                 0,                                               &
                 NULL,                                            &
                 0,                                               &
                 LOC(ReturnedByteCount),                          &
                 NULL_overlapped                                  &
                 )
return
end
