Could Not Load the dll

Issue #39 resolved
Former user created an issue

The patcher has been working perfectly for me up until a few days ago when I started getting an error when I try opening any patched Touhou game which states "Could not load the dll: thcrap.dll". The dll file was not deleted or moved, and the problem persisted when I deleted the patcher and reinstalled. If someone could tell me what the problem might be, I would greatly appreciate it.

Comments (3)

  1. nmlgc repo owner

    This will require some in-depth debugging. I'll come back to you shortly before the release of the new build (in approximately 2-3 days).

  2. nmlgc repo owner

    Well, make that 3-4 weeks... Anyway, the new build (2013-10-25) is out now, so please try again.

  3. nmlgc repo owner

    I've finally managed to reproduce this. In my case, this was caused by an old version of thcrap.dll in the game's own directory. So far, thcrap made sure to change the current directory to its own before injecting the DLL, but as it turns out, the current directory is only No. 5 in Windows' DLL search order, with the game's own directory at No. 1.

    The next build will bypass this order and make sure that the DLL is always loaded from the correct directory.

  4. Log in to comment