Fix Runtime Error R6034 in Windows 11/10