5 Ways to Fix ERROR_DIRECT_ACCESS_HANDLE
Check if you are using the right handle
4 min. read
Published on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
The ERROR_DIRECT_ACCESS_HANDLE with the error message 130 (0x82) Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O usually occurs there is an attempt to use a file handle associated with an open disk partition for an operation that isn’t allowed.
First, check whether you are using the right handle for the operation. For example, if you are performing a file operation, ensure you are using a file handle; similarly, use a raw disk handle for disk operations.
How can I fix the ERROR_DIRECT_ACCESS_HANDLE?
1. Check the disk access mode
When accessing a disk partition for raw I/O in Windows, it is important to use the correct access modes and flags. You can use GENERIC_READ and GENERIC_WRITE to enable reading and writing. However, to ensure direct communication with the hardware, you must include FILE_FLAG_NO_BUFFERING to disable system caching and FILE_FLAG_RANDOM_ACCESS to optimize non-sequential operations.
2. Run the app with admin rights
- Locate the app from the desktop or start menu, right-click it, and choose Run as administrator from the context menu.
- Click Yes on the UAC prompt to allow the app to run with elevated rights.
3. Update the disk driver
- Press Windows + R to open the Run window.
- Type devmgmt.msc and click OK to open the Device Manager app.
- Go to Disk Drives, and click it to expand.
- Right-click the drive and select Update driver from the context menu. ย ย
- Click Search automatically for drivers.
- Follow the on-screen prompt to complete the process.
If this doesn’t help or there is no update for the driver, try reinstalling it. For that, follow these steps:
- Open Device Manager, go to Disk Drives, and expand it.
- Right-click the drive and select Uninstall device from the context menu.
- Click Uninstall on the following window.
- Once the process is complete, go to Action and select Scan for hardware changes.
- Windows will scan and reinstall the driver; restart your computer to save the changes.
4. Run the CHKDSK scan
- Press the Windows key, type cmd in the search box, and click Run as administrator.
- Type the following command to repair the disk after replacing C with the system drive letter you want to check and hit Enter. The F parameter in the command will fix all the errors it finds:
chkdsk C: /f
- If the drive is in use, you will see a message indicating that it can’t lock the drive; therefore, it will ask you to check it the next time when the system restarts. Type Y and press Enter.
- If prompted, restart your computer to allow chkdsk to run and fix errors on the drive.
5. Uninstall the third-party disk management tool (if any)
- Press Windows + I to open the Settings app.
- Go to Apps, then click Installed apps.
- Locate the third-party disk management app, click the three dots icon, and select Uninstall.
- Click Uninstall and follow the on-screen instructions to complete, then check if the issue persists.
- If it does, then you can reinstall the software from its official website.
To conclude, you must use the proper file handle for an operation, run the app with admin rights, and ensure your device drivers are updated. You can also run the SFC and CHKDSK scan to ensure nothing wrong with the disk and system files.
To avoid issues like ERROR_DIRECT_ACCESS_HANDLE, you can use built-in Windows tools like Disk Management and Command Prompt. Disk Management can help you perform tasks like formatting and partitioning without issues, and Command Prompt lets you take care of low-level disk operations.
Also, it would help if you temporarily disabled your security software, as it could sometimes interfere with disk operations.
In case you have other disk-related errors, like repairing disk errors, this might take an hour; the first step is to wait for the process to complete, and you still see errors, read this guide to learn the solutions.
If you have any other questions or suggestions about ERROR_DIRECT_ACCESS_HANDLE, feel free to mention them in the comments section below. We’re happy to help!
User forum
0 messages