Quick answer: Disable power management on the network adapter, update or roll back its driver, then run netsh int ip reset and netsh winsock reset and reboot. If a VPN or virtual switch is involved, remove and recreate it.
This error shows up when an NDIS miniport — your Wi-Fi card, Ethernet NIC, or a virtual adapter from a VPN or Hyper-V — gets torn down while something still has an open handle to it. Windows closes the binding, the pending I/O fails, and you get 0X80340002 back. It's not a DNS problem and it's almost never a cable problem, even though it looks like one from the user's seat.
Had a client last month — small dental office, four workstations, all on Wi-Fi — where the front desk PC dropped its connection every 11 minutes like clockwork. Event Viewer was full of NDIS resets and the app they use for scheduling threw 0x80340002 every time it tried to sync. Turned out the Intel AX201 adapter had a power-saving setting enabled and the driver was six revisions behind. Fixed both, problem gone.
What's actually happening
NDIS sits between your network drivers and the TCP/IP stack. When a miniport goes down — because the driver reset it, because Windows put it to sleep, because a VPN filter driver unloaded, or because the adapter literally lost power — NDIS tells every binding on that interface to close. Any app with a socket in flight gets 0x80340002 instead of a clean disconnect. Common triggers:
- Adapter power management ("Allow the computer to turn off this device")
- Stale or buggy NIC drivers, especially Intel and Realtek Wi-Fi on Windows 10 22H2
- VPN clients like Cisco AnyConnect, FortiClient, or OpenVPN leaving orphaned virtual adapters
- Hyper-V or WSL2 virtual switches that get recreated on boot but leave old bindings behind
- USB Wi-Fi dongles getting yanked or briefly losing power on a flaky hub
Fix it in order — don't skip steps
- Kill adapter power saving. Open Device Manager, expand Network adapters, right-click your adapter, Properties, Power Management tab. Uncheck "Allow the computer to turn off this device to save power." If the tab isn't there, the driver doesn't support it and you can move on.
- Update the driver — or roll it back. In Device Manager, right-click the adapter, Update driver, Search automatically. If that says you're current but the problem started after a recent Windows update, click Properties, Driver tab, and hit Roll Back Driver. Intel and Realtek both ship broken Wi-Fi drivers on a fairly regular basis.
- Reset the network stack. Open an elevated Command Prompt and run these, then reboot:
The winsock reset is the one that clears orphaned NDIS bindings. The rest cleans up the IP layer so you're not chasing two problems.netsh winsock reset netsh int ip reset ipconfig /release ipconfig /renew ipconfig /flushdns - Nuke and recreate virtual adapters. If you've got Hyper-V, WSL, Docker Desktop, or a VPN installed, open
ncpa.cpland look for adapters you don't recognize or that show as "Disabled" but still bound. Remove the VPN client entirely (not just disconnect), reboot, then reinstall fresh. For Hyper-V, delete the virtual switch and recreate it in Hyper-V Manager. - Check Event Viewer for the real culprit. Open Event Viewer, Windows Logs, System, and filter by source
Netwtw10(Intel Wi-Fi),rtwlanu(Realtek),NDIS, ore1i65x64(Intel Ethernet). The error right before the 0x80340002 tells you which component is killing the interface. Don't guess — read the log.
If that doesn't fix it
Try these in this order:
- Swap the adapter. A $15 USB Wi-Fi dongle will tell you in five minutes whether the problem is the hardware or the software. If the dongle works fine for an hour of normal use, replace the internal card or the whole NIC.
- Disable IPv6 temporarily. Rare, but I've seen buggy drivers choke on IPv6 router advertisements and reset the interface.
ncpa.cpl, adapter Properties, uncheck IPv6. - Clean boot. Run
msconfig, Services tab, hide Microsoft services, disable the rest. Reboot. If the error goes away, re-enable services in halves until you find the offender. Usually a third-party VPN or antivirus filter driver. - SFC and DISM. If the winsock reset didn't take, your NDIS stack files might be corrupt:
sfc /scannow dism /online /cleanup-image /restorehealth - Reinstall Windows. Last resort. But if you've rolled back two driver versions, replaced the card, and clean-booted, the OS itself is the problem and rebuilding takes less time than chasing it further.
Stop it from coming back
Turning off adapter power management is the single biggest preventive step — 80% of the 0x80340002 tickets I see trace back to it, especially on laptops and mini PCs. After that, keep your NIC drivers current but not bleeding-edge. Wait a couple weeks after a driver release before installing it, or you'll be the one finding the bugs. And uninstall VPN clients you're not using; they leave filter drivers behind that bind to every adapter on the machine, and every one of those bindings is a chance for NDIS to close an interface you still need.
If the error only happens on Wi-Fi and stops the moment you plug in Ethernet, it's the Wi-Fi driver or its power settings. Every time. Don't waste an afternoon on DNS.