Windows 10: OneDrive Randomly Causing DLL Load Order Bugs

Discus and support OneDrive Randomly Causing DLL Load Order Bugs in Windows 10 Network and Sharing to solve the problem; One of my fellow developers on a project of ours experienced a very strange bug yesterday/today that we can only assume/narrow down to potentially... Discussion in 'Windows 10 Network and Sharing' started by atom0s, Nov 20, 2020 at 5:18 PM.

  1. atom0s Win User

    OneDrive Randomly Causing DLL Load Order Bugs

    One of my fellow developers on a project of ours experienced a very strange bug yesterday/today that we can only assume/narrow down to potentially being a bug with OneDrive.

    To give some context, our project is an injected hook into a video game to expand the game's feature set and add functionality. One of the features of our project is the ability to allow other developers to create plugins for our hook and load/unload them at runtime. Plugins are stored in a sub-folder to the root of our project called '/plugins/'. A small layout of the project would be:




    When a plugin is loaded, we first set the current directly to the /plugins/ path based on where the user has installed the project. So for example, if installed into Program Files x86, the SetCurrentDirectory call would be on the lines of:

    ::SetCurrentDirectory"C:\\Program Files x86\\Ashita 4\\plugins\\";

    Then a LoadLibrary call attempt is made with just the plugin name, in this example 'hardwaremouse.dll'.

    Following the load order rules of the system as seen here:

    the module should be loaded after a few attempts at looking in the system directory. However, for this developer we logged and witnessed the following which is entirely not valid/following the load order mechanism of the system:

    • C:\Program Files x86\PlayOnline\SquareEnix\PlayOnlineViewer\hardwaremouse.dll - This is valid for the application directory since we are injected into another process.
    • C:\Program Files x86\Microsoft OneDrive\20.201.1005.0006\hardwaremouse.dll - Bug immediately presents itself afterward as OneDrive is being used as the 2nd searched path.
    • C:\Windows\SysWOW64\hardwaremouse.dll
    • C:\Windows\System\hardwaremouse.dll
    • C:\Windows\hardwaremouse.dll
    • C:\Program Files x86\Common Files\Oracle\Java\javapath_target_1622277218\hardwaremouse.dll
    • C:\Program Files x86\Common Files\Oracle\Java\javapath_target_1622277218\hardwaremouse.dll
    • C:\Program Files x86\Razer Chroma SDK\bin\hardwaremouse.dll
    • C:\Program Files\Razer Chroma SDK\bin\hardwaremouse.dll
    • C:\Program Files x86\Google\Chrome\Application\hardwaremouse.dll
    • C:\Windows\SysWOW64\hardwaremouse.dll
    • C:\Windows\hardwaremouse.dll
    • C:\Windows\SysWOW64\wbem\hardwaremouse.dll
    • C:\Windows\SysWOW64\WindowsPowerShell\v1.0\hardwaremouse.dll
    • C:\Windows\SysWOW64\OpenSSH\hardwaremouse.dll
    • C:\Program Files x86\NVIDIA Corporation\PhysX\Common\hardwaremouse.dll
    • C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR\hardwaremouse.dll
    • C:\Program Files\dotnet\hardwaremouse.dll
    • C:\Program Files\Git\cmd\hardwaremouse.dll
    • C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\hardwaremouse.dll
    • C:\Program Files\FileBot\jre\bin\hardwaremouse.dll
    • C:\Program Files\PuTTY\hardwaremouse.dll
    • C:\Program Files\Microsoft SQL Server\120\Tools\Binn\hardwaremouse.dll
    • C:\Program Files\Common Files\Autodesk Shared\hardwaremouse.dll
    • C:\Program Files\Microsoft SQL Server\130\Tools\Binn\hardwaremouse.dll
    • C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\hardwaremouse.dll
    • C:\Program Files\FileBot\hardwaremouse.dll
    • C:\Program Files x86\Ashita 4\plugins\%SystemRoot%\system32\hardwaremouse.dll
    • C:\Program Files x86\Ashita 4\plugins\%SystemRoot%\hardwaremouse.dll
    • C:\Program Files x86\Ashita 4\plugins\%SystemRoot%\System32\Wbem\hardwaremouse.dll
    • C:\Program Files x86\Ashita 4\plugins\%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\hardwaremouse.dll
    • C:\Program Files x86\Ashita 4\plugins\%SYSTEMROOT%\System32\OpenSSH\hardwaremouse.dll
    • C:\Users\Administrator\.dotnet\tools\hardwaremouse.dll
    • <System deemed the LoadLibrary call failed with error 126 at this point.>

    The first path is valid due to being an injected hook into another process, however, immediately after we see OneDrive being searched, which is not valid to the documented load order. This also does not even fall under valid if 'SafeDllSearchMode' is disabled which it is not on this users system. The current directory is being force-set by us before calling LoadLibrary to the valid path of our projects plugin folder as mentioned above.

    As you can see with the order here, it's completely broken and wrong. It begins with breaking at the OneDrive folder, then scans the proper system folders. Afterward, it scans a few PATH potential directories before scanning the system folders a second time oddly. Afterward, it continues to search PATH based directories before also bugging out and doing path variable expansion with the current directory appended to the start. This looks completely broken/wrong and does not follow the load order documentation at all, no matter what setting setup used.

    Upon restarting the users system, the load order is fixed and instead, we see the valid order be followed here:

    • C:\Program Files x86\PlayOnline\SquareEnix\PlayOnlineViewer\hardwaremouse.dll
    • C:\Windows\SysWOW64\hardwaremouse.dll
    • C:\Windows\System\hardwaremouse.dll
    • C:\Windows\hardwaremouse.dll
    • C:\Program Files x86\Ashita 4\plugins\hardwaremouse.dll
    • <System stops load attempt; deemed successful and found.>

    The only thing we can assume from this is that OneDrive is causing issues, potentially due to:

    • A pending OneDrive core update.
    • A recent update to OneDrive in the Windows 20H2 update that is broken/bugged.
    • An issue/error inside of OneDrive or some related driver causing the load order to bug out/break.

    The user was not actively using OneDrive at the time, although it is on/enabled.

    There was no file sync pending with OneDrive.

    Restarting just the application did not resolve the issue while the load order was broken due to this bug.

    This user has never experienced this issue with our project until recently updating to Windows 20H2.


  2. Windows 10 - OneDrive

    Right click on the app and one of the properties has an option to not automatically start it. Uncheck, restart the computer, and it should stop. If you want to go another step further, find the OneDrive app in the start menu, right click on it and uninstall.

    If that is still insufficient, there is a batch uninstaller for OneDrive available online. I can copy the code here if you need it.
    FordGT90Concept, Nov 20, 2020 at 5:23 PM
  3. DLL Missing

    The problem is, that the required DLL is not actually even listed there.
    There are just dozens of download adware links from the top to the bottom.
    TairikuOkami, Nov 20, 2020 at 5:23 PM
  4. HAT
    hat Win User

    OneDrive Randomly Causing DLL Load Order Bugs

    Randomly failing to load webpages?

    On my computer, Google Chrome, IE9 and Firefox 4 all randomly fail to load webpages. A few quick points:

    • This happens even on a fresh install of Windows (and on my previous install as well)
    • I thought it might have been my ISP's DNS server failing, so I switched to Google DNS and it still randomly fails
    • My router is a homemade machine featuring a 2GHz P4 Celeron, 256MB SDR memory, and a 512MB CF card as the hard drive running the generic x86 DD-WRT client
    • I've rebooted my modem/router many times and the problem persists
    • I am no longer using my surge protector to protect my modem, the coaxial cable runs straight from the wall to the modem
    What should I do?

OneDrive Randomly Causing DLL Load Order Bugs

  1. OneDrive Randomly Causing DLL Load Order Bugs - Similar Threads - OneDrive Randomly Causing

  2. Onedrive Sign in Loading

    in Windows 10 Network and Sharing
    Onedrive Sign in Loading: HI,i can't sign in Onedrive "Loading" is written,but any result doesn't exist
  3. Steam dll failed to load

    in Windows 10 Drivers and Hardware
    Steam dll failed to load: Hi, I have a problem with Steam that says after "extracting package" fatal error, failed to steamui.dll. I have tried many solutions, like updating all my drivers, system restoring, all commands for command prompt admin, deleting other files, contacting steam, restarting my...
  4. Unable to load Dll

    in Windows 10 Installation and Upgrade
    Unable to load Dll: updated windows 10 and received unable to load Dll '!aStorAfsServiceApl.dll' how do I do I resolve problem or eliminate message
  5. dll file unable to load

    in Windows 10 BSOD Crashes and Debugging
    dll file unable to load: A couple of weeks ago, I upgraded Windows 10 to the latest version. Ever since then, I've been getting an error message: iaStorAFsServiceApi.dll file unable to load. HRESULT 0x8007007. I would get the message once or twice a day at first, but today I am getting it every 5...
  6. Unable to load DLL iaStorAfsServiceApi.dll

    in Windows 10 BSOD Crashes and Debugging
    Unable to load DLL iaStorAfsServiceApi.dll: Hi there, My problem is small popup window which appears in right bottom corner of the screen each time when I am launching windows explorer. [ATTACH] Would you please advise me how to eliminate the above described problem? Thanks & Best Regards...
  7. Unable to load DLL

    in Windows 10 Installation and Upgrade
    Unable to load DLL: Last night i updated my windows to its latest version(Feature update to Windows 10, version 1903). But since then when ever i open file explorer i get an error popup.[ATTACH]...
  8. Unable to load DLL

    in Windows 10 Installation and Upgrade
    Unable to load DLL: I was trying to install an application and then a message appeared: "Unable to load DLL 'AR_HCISTT\HCILAB_STT_ENG.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". I installed this app on my old PC and it worked fine, but I couldn't install...
  9. OneDrive link bug

    in Windows 10 Support
    OneDrive link bug: I use the OneDrive share link feature to share my photos; it is a great feature. However it has a bug. I recently shared links to two sets of files. One worked for the receivers. The other did not and reported empty file. I deleted the folder, set it up again with the same...
  10. Failed to load resource DLL?

    in Windows 10 Support
    Failed to load resource DLL?: What does "Failed to load resource DLL" mean? Why is my PC doing this? [img] 64899