Is there anyway to know which functions exported from the dll througth python foreign function library -ctypes-
and if possible to know details about the exported functions throught ctypes.
if yes could someone provide snippet of code
Is there anyway to know which functions exported from the dll througth python foreign function library -ctypes-
and if possible to know details about the exported functions throught ctypes.
if yes could someone provide snippet of code
I don't think ctypes offers this functionality. On Windows with visual studio:
DUMPBIN -EXPORTS XXX.DLL
Or for mingw on windows:
objdump -p XXX.dll
In general, this is not possible, because, again in general, dynamically loaded libraries do not carry the meta-information you require. It may be possible to obtain that information in certain special cases through system-specific ways, but ctypes
itself does not fetch that information. You can record such info via ctypes
(see e.g. the restype and argtypes
attributes of function pointers), but only after you have obtained it by different means.