mainly some stuff for  win32 port