Search code examples
windowskerneldriverntfs

Create a symbolic link (or other NTFS reparse point) in Windows Driver


I can open, close, create files and directories using the Zw* functions available for Windows Kernel services. I can even open the underlying symbolic link object using ZwOpenSymbolicLinkObject, but I can't seem to actually make symbolic links.

It seems this level of the API is not aware of symbolic links, so how would I go about using this (filesystem!) feature without the Win32 API?


Solution

  • There isn't direct API to create reparse points.

    You need to use ZwFsControlFileZwFsControlFile() to send FSCTL_SET_REPARSE_POINT ioctl with appropriate input buffers and parameters.

    Don't have example though!