Code from https://stackoverflow.com/a/44503794/266378 which is hopefully working with MSVC.
Attach a file by drag & drop or click to upload