y3t1
y3t1

Reputation: 195

Windows Error 1114 while loading dll in Python

I am currently trying to port some code from a 32 bit windows XP computer to a 64 bit windows 10 computer. I need in my python code to import home developed C dlls as follow :

    from ctypes import *
    [...]
    self.inter_test_dll = windll.LoadLibrary("my.dll")

    self.w = QtWidgets.QWidget()
    self.wid = self.w.winId()
    self.wid.setsize(64)
    print(self.wid)
    self.inter_test_dll.dll_load_window(int(self.wid), 'test')
    self.inter_test_dll.dll_connect(2, self.callback)
    [...]

The program crashes as soon as the dll is loaded with a cryptic

    Windows Error 1114

Which means a dll crashed on initialization. I have tried my dll on my personal machine (64 bits Windows 7), no issue, it all works fine. I have tried that dll on the same 64 bits Windows 10 machine from within a C program, LoadLibrary("my.dll") also fails but LoadLibraryEx("my.dll",NULL, DONT_RESOLVE_DLL_REFERENCE ) does work.

When I run a dependency walker on my dll, it seems to miss some 2 to 4 depth level dll, but it weirdly doesn't seem to affect its working when called properly from within the C program.

So my question is, is there a way to instantiate my dll within Python without an in-depth check of its dependencies ? If not, is there a way to modify my windows behavior, in order to skip that check by default ?

Thanks a lot !

Upvotes: 3

Views: 1451

Answers (1)

y3t1
y3t1

Reputation: 195

Thanks for the comments, I have resolved my issue.

WxWidgets has been updated 2 days ago. I have recompiled my dll with this new version and the bug is gone.

Sorry I couldn't find a more general approach to the problem.

Upvotes: 1

Related Questions