Looks like it’s possible to use the stuff given [here](https://docs.microsoft.com/en-us/windows/desktop/fileio/file-security-and-access-rights) to do this.