In playing around with this more, you can successfully delete the link if
you use the new FileDispositionInfoEx class (without the
FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK bit set).
Wrote a small test app to demonstrate the behavior. It creates a hard link
against the running executable and tries to delete it both the non-Ex and Ex
way:
https://github.com/OSRDrivers/deleteex
You can see the non-Ex way fails but the Ex way successfully removes the
link.
-scott
OSR
@OSRDrivers