Convert os_win32.c to C++