Rework to drop win32 and use ctypes exclusively.