from ctypes import *
mydll = cdll.LoadLibrary("AmlImagePack.dll")
print (mydll)
AmlImg_check = getattr(mydll, '?AmlImg_check@CAmlImagePack@@QAEHPAX@Z')
print (AmlImg_check) #Darwin is a genius
AmlImg_check.argtypes = [c_char_p] #тип аргументов
AmlImg_check.restype = c_void_p #тип резалта
arg_cost = c_char_p(b'aml_upgrade_package.img')
AmlImg_check(arg_cost)
Code:
<CDLL 'AmlImagePack.dll', handle 74cd0000 at 2cb9710>
<_FuncPtr object at 0x02CA3EB8>
Traceback (most recent call last):
File "D:\#Research\crc_calc.py", line 39, in <module>
AmlImg_check(arg_cost)
OSError: exception: access violation writing 0x00000000"