I can make sure this dll is accurate.
Why does the program crash immediately after successfully calling the function APlayer_Create and prompts: The process has ended and the exit code is -1073740771 (0xC000041D)
aplayerCaller = ctypes.CDLL(application_path + '\APlayerCaller.dll')
global CALLBACK,Callback_cfun,Callback_address,aaa
aaa = self.OnMessage_Callback
CALLBACK = ctypes.CFUNCTYPE(None, ctypes.c_int,ctypes.c_int,ctypes.c_int)
Callback_cfun =CALLBACK(aaa)
Callback_address = ctypes.cast(Callback_cfun,ctypes.c_void_p).value
#aa = ctypes.cast(OnMessage_Callback_cfun, ctypes.c_void_p).value
print(CALLBACK,Callback_cfun,Callback_address)
aplayer = aplayerCaller.APlayer_Create(winID, 0, 0, self.width(), self.height(),
Callback_address, 0, 0, 0, 0, 0, 0, 0)
def OnMessage_Callback(self,a2, a3,a4):
qs = QMessageBox.information(self,'zzz','test',)
print(f'a1={self},a2={a2},a3={a3},a4={a4}')
a2, a3, a4, I can get the data normally and print it out once, but then it crashes immediately and prompts an error message (-1073740771 (0xC000041D)) in pycharm. If it is normal, it should keep outputting a2, a3, a4 until my mouse stop moving