Call function defined in exe

I need to know how to call a function defined in exe from a python script. I know how to call all exe from py file.

+3
source share
3 answers

If your EXE is not a COM object or does not export certain functions, such as a DLL, this is not possible.

For the COM method, consider these resources:

For exported functions, such as the dll method, use the python win32 module along with the LoadLibrary Win32 API and related functions.

If you have access to the source code of the EXE:

EXE, , . ps. os.system subprocess.call().

+6

, . exe dll ( ). .

+1

If the specified executable does not accept command line arguments that will determine which function to use, I do not think it is possible.

With that said, if you created an EXE, command line arguments are a good way to implement the functionality you're looking for.

0
source

Source: https://habr.com/ru/post/1704005/


All Articles