“Unable to Load DLL ‘hidapi.dll’: Access Is Denied”

ThreatLocker logo

Short answer: on a managed computer this message usually means application control software, such as ThreatLocker, blocked hidapi.dll when your touchpad or headset software started. Click OK, note the time and send it to your IT team. They can find the block in their audit log and permit the file.

A product distribution business contacted us after one of their managers’ laptops failed to start properly one morning. After a battery reset, Windows loaded but a “Program Stopped” box appeared saying “Unable to load DLL ‘hidapi.dll’: Access is denied”. He clicked OK and the laptop seemed fine, but the business wanted to know what the error meant. Disk checks and system file scans found nothing related to hidapi.dll. The real cause was the business’s application control software quietly blocking a touchpad driver file during startup. Here is what we found and how to fix it.

Fixed by Ellen Sawa-an, IT Support Specialist at GCIT. Written up by Elliot Munro, CISO.

Symptoms

Shortly after Windows starts, before or just after signing in, a dialog box titled Program Stopped appears with a red error icon and an OK button:

A fatal problem has occurred.
Unable to load DLL ‘hidapi.dll’: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Program Stopped dialog: A fatal problem has occurred. Unable to load DLL hidapi.dll: Access is denied (HRESULT 0x80070005 E_ACCESSDENIED)

Clicking OK closes the box and Windows usually carries on normally. You may also see the error described as “hidapi.dll access denied”, “a fatal problem has occurred hidapi.dll”, “0x80070005 E_ACCESSDENIED when loading a DLL” or “hidapi.dll error at startup”. In our case Windows logged no application crash event for it, which fits the message coming from the program that tried to load the file rather than from Windows itself.

Affected Software

  • Application: Any program or driver component that uses hidapi.dll. In our case it was part of the PixArt touchpad driver package on a Windows 11 laptop.
  • Platform: Windows 10 and Windows 11
  • Related Services: Application control or allowlisting software, such as ThreatLocker, Microsoft App Control for Business or AppLocker

Cause

hidapi.dll is a common library that programs use to talk to USB and Bluetooth input devices, known as HID (human interface devices). Touchpad, keyboard, mouse and headset software often includes a copy. On the laptop we fixed, the only copies of hidapi.dll were inside the PixArt touchpad driver package in the Windows driver store (C:\Windows\System32\DriverStore\FileRepository\pixartservice.inf_amd64_...).

“Access is denied” (0x80070005) means Windows refused to let the program load the file. When the file permissions are normal and the file is not damaged, the usual reason on a business computer is application control software, which only allows approved programs and libraries to run.

The laptop was protected by ThreatLocker in Secure mode. The ThreatLocker Unified Audit showed that hidapi.dll had been denied an Execute action under the SYSTEM account, seconds after the touchpad driver started at boot. Because the block happened under the SYSTEM account during startup, not in a signed-in user’s session, no approval request popped up for the user and nothing arrived in the approval queue. The only visible sign was the Program Stopped message.

We ruled out other causes first: sfc /scannow and a read-only chkdsk found nothing related to hidapi.dll, the permissions on every copy of hidapi.dll were the standard ones for driver store files, and the endpoint protection product had not quarantined anything.

Resolution

For the person using the computer

  1. Click OK to close the message. It does not damage your files.
  2. Take a photo or screenshot of the message and note roughly when it appeared (for example “straight after turning the laptop on at 8:30am”).
  3. Send this to your IT team or managed service provider. The time matters, because it lets them find the matching block in their security logs.

For administrators using ThreatLocker

  1. Sign in to the ThreatLocker portal and open the Unified Audit.
  2. Set the Action filter to Any Deny, then use Advanced Search to filter by the computer’s hostname and the file name hidapi.dll. Set the date range to cover the time the error appeared and select Search.
  3. Look for an entry with action type Execute, username SYSTEM and a full path that shows where hidapi.dll lives. Check the path belongs to a legitimate driver or vendor folder you expect on that device (in our case the PixArt touchpad driver package in the driver store).
  4. Expand the entry and select Permit Application, then choose Add to Application and enter the application name.
  5. Keep the permit as narrow as practical. ThreatLocker lets you match on path, process path, hash and certificate. If the file is signed and its hash changes with driver updates, ThreatLocker’s guidance is to match on the folder path with an asterisk plus the publisher certificate, rather than the hash.
  6. Select Add, then Save, then Deploy Policies.
  7. Restart the computer and confirm the Program Stopped message no longer appears. Check the Unified Audit again for any further denies from the same driver package.

For administrators using other application control products

  1. With Microsoft App Control for Business (formerly Windows Defender Application Control), open Event Viewer on the affected PC and go to Applications and Services Logs > Microsoft > Windows > CodeIntegrity > Operational. Event ID 3077 records a file that was blocked by an enforced policy. Event ID 3076 records what would have been blocked by an audit-mode policy.
  2. With AppLocker, check Applications and Services Logs > Microsoft > Windows > AppLocker > EXE and DLL for blocked events around the time of the error.
  3. If hidapi.dll was blocked and the file is part of a legitimate driver or vendor package, add an allow rule for it following your product’s normal process, ideally based on the publisher signature, and restart to confirm.

Important Notes

  • Do not just copy a new hidapi.dll from the internet. DLL download sites are a common source of malware, and replacing the file will not help if application control is what is blocking it.
  • Confirm the file is genuine before permitting it. Check the full path and digital signature in the audit entry. A hidapi.dll in an unexpected place, such as a user’s Downloads or Temp folder, should be investigated rather than approved.
  • System scans can look clean. SFC, DISM and disk checks only test Windows’ own files and the disk. They will not reveal an application control block, which is why this error can waste time if you start there.
  • Startup blocks are silent. Blocks that happen under the SYSTEM account at startup do not usually produce a request the user can submit. Reviewing denies in your application control logs after driver updates, or after a laptop has been forced off, helps catch them early.
  • Driver updates can bring it back. If the touchpad or peripheral driver is updated to a new folder, a path-only permit may no longer match. Certificate-based rules handle updates better.

If you need help finding and safely permitting blocked files in your application control platform, get in touch with our team.

Was this article helpful?
Ready to secure and simplify your IT? Talk to a GCIT expert today.