FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


generalhints

General Hints

DLL Problems

Missing DLLs

There are two ways to find missing DLLS.

1) Use the following code to list the DLLs a python script uses

from modulefinder import ModuleFinder

finder = ModuleFinder() finder.run_script(“tryloadlib.py”) finder.report()

This will report all the DLLs (modules) the script uses. You can then check to verify that each of them is installed on your computer. This can be automated with a script.

2) Use Process Monitor

SysInternals Process Monitor monitors all processes within a system and displays information about each of them. You can filter only the process you are having problems with and look for NAME_NOT_FOUND errors. If these are caused by a CreateFile event, the DLL listed cannot be found.

Incorrect DLLs

Sometimes DLLs can me mismatched with the program trying to use them. For instance, a 32-bit version of Python cannot use 64-bit DLLs (and vice versa). In order to determine what type of DLL you have installed, perform the following:

  1. Open a Visual Studio Command Prompt (Statr → Vistual Studio → Develop COmmand Prompt)
  2. For each DLL in question, run the following:

dumpbin /headers <dll-in-question>

The two things to check are:

FILE HEADER VALUES → machine should be correct for you program (x86) OPTIONAL HEADER VALUES →magic should be correct for your program (PE32, PE32+, PE64)

DLL Search Path

Microsoft Windows searches for DLLs in a specific order.

  • Directory where the executable resides
  • The current Directory
  • The Windows System Directory
  • The Windows Directory
  • Directories in the PATH environment variable

Note: LIBPATH is not used.

generalhints.txt · Last modified: 2019/02/15 15:33 by dtscbs