Python, ctypes, DLLs and PCOMM emulation. How can I pre-allocate a variable?
问题 After a long time learning python I finally managed to make some breakthroughs: I'm using the following code to connect to a personal communications terminal: from ctypes import * import sys PCSHLL32 = windll.PCSHLL32 hllapi = PCSHLL32.hllapi def connect_pcomm(presentation_space): function_number = c_int(1) data_string = c_char_p(presentation_space) lenght = c_int(4) ps_position = c_int(0) hllapi(byref(function_number), data_string, byref(lenght), byref(ps_position)) And so far so good. It