'Get security details of remote file

I want to get the security details of a remote file x ( its dacl, sacl, owner ) . I tried GetNamedSecurityInfo , but it works only for local files or files that the current user has access on. I do have an user credential that can access x. How can i impersonate this credentials and access the remote file.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source