1

I have confirmed: MSFTFTCJTAG.dll exists in C:\ddey_documents. Having issue in loading it. Any help?

import os
from ctypes import *
os.chdir(r'c:\ddey_documents')
Flywatter2 = WinDLL(r"C:\ddey_documents\MSFTFTCJTAG.dll")

Error:

File "C:\Python39\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\ddey_documents\MSFTFTCJTAG.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Things I have tried:

  1. tried adding following without help: os.add_dll_directory(r"C:\ddey_documents)

  2. Was getting following error initially, OSError: [WinError 193] %1 is not a valid Win32 application. It got fixed by applying following two steps:

Dibyendu Dey
  • 349
  • 2
  • 16
  • 1
    Use https://stackoverflow.com/a/28304716/5769463 to see dependencies of your dll and ensure they can be found. – ead Aug 05 '21 at 04:09

1 Answers1

0

I have now able to use dumpbin to check all dependencies for the DLL:

  1. install Visual Studio (I did Community version)
  2. open --> Tools --> Command Line --> Developers Command Prompt
  3. Type dumpbin
  4. If it says can't find dumpbin. You need to go to --> folder where Visual Studio installed --> 2019 --> Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64 and install editbin.exe
  5. Run your dll: dumpbin /DEPENDENTS MSFTFTCJTAG.dll

Results:

enter image description here

Dibyendu Dey
  • 349
  • 2
  • 16