0X80040068

Fix DV_E_LINDEX (0X80040068) Invalid lindex Error on Windows

DV_E_LINDEX shows up when COM or OLE calls use a bad index parameter. This fix walks you through registry repairs, re-registering DLLs, and rebuilding the component database.

30-Second Fix: Re-Register the OLE Core DLL

I know seeing error codes like 0X80040068 makes you want to throw your keyboard. This one usually pops up when an application tries to access an element in a COM collection using an invalid index—think of it like asking for the 10th item in a list that only has 5. It happens a lot after Windows updates, Office installs, or when a script tool like PowerShell or VBScript hits a corrupted OLE registration.

The quickest fix? Re-register the core OLE DLL. This takes 30 seconds and works in maybe 40% of cases.

  1. Press Win + R, type cmd, then press Ctrl + Shift + Enter to open an admin command prompt.
  2. Run this command exactly:
regsvr32 /u oleaut32.dll
regsvr32 oleaut32.dll

Wait for the success message. Then restart your app and test. If the error’s gone, you’re done. If not, move to the next step.

5-Minute Fix: Repair the COM Registry Entries

If re-registering didn’t cut it, the registry keys that map COM interfaces might be mangled. I’ve seen this after uninstalling a program that didn’t clean up after itself—leaving orphaned Interface or CLSID entries that point to nothing. This fix checks and restores those keys.

Step 1: Export and Review the Relevant Registry Key

Open Regedit (type regedit in Run). Navigate to:

HKEY_CLASSES_ROOT\Interface

Right-click Interface and select Export to back it up. Then look for entries with a Default value of IDispatch, IEnumVARIANT, or IUnknown—those are the ones DV_E_LINDEX trips on. If any are missing or empty, you’ll need to restore them.

Step 2: Run a System File Checker (SFC) Scan

Corrupted system files can break COM registrations. Run this in an admin command prompt:

sfc /scannow

Let it finish—takes 5–10 minutes. It’ll replace any busted files with cached copies. After that, reboot and test your app.

Step 3: Re-register All COM DLLs (Bulk Fix)

If SFC didn’t help, you can force a re-registration of common COM DLLs. In the same admin command prompt, run:

for %i in (%windir%\system32\*.dll) do regsvr32 /s %i

Caution: This takes a few minutes and may show errors for non-COM DLLs—that’s normal. After it’s done, restart and check. If the error persists, go to the advanced fix.

15+ Minutes: Rebuild the Component Database (Advanced)

This is the nuclear option—but it’s the one that fixed DV_E_LINDEX for me on a client’s Windows 10 machine that had been through three Office upgrades and two antivirus changes. The error kept popping up in a custom VB6 app until I rebuilt the COM database from scratch.

Why This Works

The COM component database lives in %windir%\system32\oleaut32.dll and a few other system files. When these get corrupted, OLE can’t resolve indexes correctly. Rebuilding forces Windows to recreate them cleanly.

Step 1: Boot into Safe Mode

Restart your PC and press F8 (or Shift + Restart on Windows 10/11) to boot into Safe Mode with Networking. This prevents third-party apps from interfering.

Step 2: Run DISM to Repair System Image

Open an admin command prompt in Safe Mode and run:

DISM /Online /Cleanup-Image /RestoreHealth

Let it run—it can take 15–20 minutes. It fixes underlying corruption SFC misses.

Step 3: Delete and Recreate COM Registry Keys

Warning: Only do this if you’re comfortable with regedit. Back up the entire HKEY_CLASSES_ROOT hive first. Then delete the following keys (yes, delete them—Windows will recreate them on reboot):

HKEY_CLASSES_ROOT\Interface
HKEY_CLASSES_ROOT\TypeLib
HKEY_CLASSES_ROOT\CLSID

After deleting, restart normally. Windows will rebuild these keys from %windir%\system32\*.dll registrations. Your app should now work.

Step 4: Test Again

Launch the application that gave you the error. If it’s still failing, you may have a corrupted system file that needs an in-place upgrade (repair install) of Windows—but that’s rare.

One last tip: DV_E_LINDEX (0X80040068) often follows a failed Office update. If none of these fixes work, try running the Office repair tool (Control Panel > Programs > right-click Office > Change > Quick Repair). That’s fixed it for me more times than I can count.

You’ve got this. Errors with hex codes look scary, but they’re almost always just a registration or index mismatch. Start with the 30-second fix and work your way down—odds are you’ll be back to work in under 10 minutes.

Related Errors in Windows Errors

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.