News for hackers. Stuff that matters.
Re:Show HN: AtomicWrite: cross platform library for atomical... by abcd_f on Tuesday March 13, 2018 @03:59AM (#16574449)
You may want to look at MoveFileEx
Re:Show HN: AtomicWrite: cross platform library for atomical... by pjc50 on Tuesday March 13, 2018 @05:49AM (#16574812)
This is the correct answer, with MOVEFILE_REPLACE_EXISTING|MOVEFILE_WRITE_THROUGH

(I see that also provides MOVEFILE_DELAY_UNTIL_REBOOT as a workaround for executable images that are in use)