On Tuesday, August 12, 2014 3:36:17 PM UTC-3, c1234 py wrote: > Hi, > > Im working in the development of a program based in python that allow us to > contrl a spectometer. The spectometer has an .dll file. The idea is to work > through this dll and operate the spectometer. > > The name of the .dll is AS5216.dll. I've trying with ctype, but it doesn't > work. > > I'm begginer in python. > > All the comments are useful to me.
I'm using this >>import ctypes hllDll=ctypes.WinDLL("C:\\AS5216.dll") hllApiProto = ctypes.WINFUNCTYPE (ctypes.c_int,ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p) hllApiParams = (1, "p1", 0), (1, "p2", 0), (1, "p3",0), (1, "p4",0), hllApi = hllApiProto (("HLLAPI", hllDll), hllApiParams) p1 = ctypes.c_int (1) p2 = ctypes.c_char_p (sessionVar) p3 = ctypes.c_int (1) p4 = ctypes.c_int (0) hllApi (ctypes.byref (p1), p2, ctypes.byref (p3), ctypes.byref (p4)) Thanks -- https://mail.python.org/mailman/listinfo/python-list