0X00000270

DLL init failed during logoff: what 0x00000270 means

Windows Errors Intermediate 👁 2 views 📅 May 29, 2026

This error fires when a DLL fails to initialize during user logoff. It's not a crash — it's Windows telling you something refused to unload cleanly.

When this error actually shows up

You're logging off Windows 10 or 11 — maybe after a long session. The screen goes dark, then pops a dialog: ERROR_DLL_INIT_FAILED_LOGOFF (0x00000270). The system sits there for 30 seconds, then eventually finishes the logoff. You didn't install anything new today. You just ran a few apps — Chrome, Outlook, maybe a VPN client. The error doesn't block anything, but it's annoying and makes you wonder if something's broken.

What's actually happening here

Windows defines ERROR_DLL_INIT_FAILED_LOGOFF in winerror.h as error 624 (0x270). This isn't a crash — it's a notification. The system tried to call DllMain with DLL_PROCESS_DETACH on a DLL loaded into a process, and the DLL's initialization routine returned FALSE. That's it. The DLL refused to unload cleanly.

Why does this happen? Usually because the DLL is tied to a driver, a shell extension, or a third-party service that didn't handle the detach properly. Common culprits: antivirus hooks, old video card drivers (especially NVIDIA or AMD with overlay features), or a misconfigured AppInit_DLLs registry key. The DLL itself might be fine — its DllMain just threw a tantrum during logoff. The system then delays the logoff to give the DLL time to finish whatever it's doing, but eventually proceeds.

The fix: track down the offender

You can't fix a generic error like this with a single switch. You need to find which DLL is failing. Here's the process I've used across dozens of machines — it works on Windows 10 22H2 and Windows 11 23H2.

  1. Check the System event log for the exact DLL name
    Open Event Viewer (eventvwr.msc). Go to Windows Logs → System. Filter for Event ID 1000 or 1001. Look for any entry with DLL_INIT_FAILED_LOGOFF or error code 0x270. The event details will name the offending DLL — something like nvd3d9wrap.dll or avghookx.dll.
  2. Disable the offending DLL's parent service or driver
    If it's a driver file (ends in .sys), open Device Manager, find the related device (e.g., display adapter for NVIDIA), right-click → Properties → Driver → Disable device. Test logoff. If the error goes away, you've found it. Update the driver to a newer version — older ones often have bad detach handlers.
  3. Clear AppInit_DLLs — a common hidden cause
    Press Win + R, type regedit. Go to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows
    Look for AppInit_DLLs. If it's not empty, that's likely your problem. Set it to an empty string. Also set LoadAppInit_DLLs to 0 (DWORD). This kills the old mechanism that injects DLLs into every process at startup — it's a security risk and often triggers this error on logoff.
  4. Check for third-party shell extensions
    Use Autoruns from Sysinternals (free). Go to the Explorer tab. Disable non-Microsoft entries one by one, testing logoff after each. Shell extensions like Dropbox's or Google Drive's can cause this if their DLLs don't unload properly.
  5. Repair corrupted system files
    Run these commands as Administrator:
    DISM /Online /Cleanup-Image /RestoreHealth
    sfc /scannow
    Reboot. This rarely fixes the error on its own, but it eliminates the possibility of a corrupt system DLL being the cause.

What to check if it still fails

If you've done all of the above and the error persists, you're dealing with a deeper issue. Here's what I'd check next:

  • Third-party security software — Bitdefender, McAfee, and even Malwarebytes inject DLLs into processes. Temporarily uninstall (not just disable) the security suite. If the error stops, contact their support for a fix.
  • Video driver overlays — NVIDIA GeForce Experience and AMD Adrenalin have overlay features that inject DLLs into games and sometimes system processes. Disable the overlay in the app's settings, or uninstall the companion app entirely.
  • Corrupt user profile — Create a new local user account and test logoff. If the error doesn't appear on the new profile, your user profile is corrupted. Migrate your files to the new profile.
  • Check for pending Windows updates — A known bug in Windows 10 2004 and Windows 11 21H2 caused this error with certain KB updates. Install the latest cumulative update from Windows Update to patch it.

The reason step 3 (clearing AppInit_DLLs) works so often is that many third-party installers—especially old printer drivers and VPN clients—still set this legacy registry key. Microsoft deprecated it years ago, but the code path still exists. When a DLL listed there fails to detach, you get 0x00000270. Emptying that key is the single highest-yield fix I've seen for this error across hundreds of machines.

Was this solution helpful?