port helpers to the win32