-
The following script executed in python 3.13 provides a handle for GetModuleHandleA(b'python'). Script: test.py import ctypes
from ctypes import wintypes
# Define the GetModuleHandleA function
GetModuleHandleA = ctypes.windll.kernel32.GetModuleHandleA
GetModuleHandleA.argtypes = [wintypes.LPCSTR]
GetModuleHandleA.restype = wintypes.HMODULE
# Call the function with the module name
module_name = b"python3" # Example module name
handle = GetModuleHandleA(module_name)
print(handle) pyinstaller call: pyinstaller --noconfirm --onefile --console --name "test" --distpath "." --clean "test.py" OS: Win10/11 Do I do something wrong or maybe I missed an important argument for pyinstaller? I appreciate any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you don't collect the That DLL is not collected automatically, unless it is a link-time dependency of some other collected DLL or python extension module. Which is not the case with your sample. |
Beta Was this translation helpful? Give feedback.
If you don't collect the
python3.dll
into the frozen application, it is expected to return None, is it not?That DLL is not collected automatically, unless it is a link-time dependency of some other collected DLL or python extension module. Which is not the case with your sample.