Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

@Alex K.: Small remark: NtFsControlFile is documented in http://msdn.microsoft.com/en-us/library/ff566462(v=VS.85).aspx . Kernel mode application should use ZwFsControlFile function and user mode application can use NtFsControlFile .

@vedang: From you question I would assume that you don't a developer of kernel mode driver. So I will strictly recommend you to use only DeviceIoControl to send FSCTL_XXX codes http://msdn.microsoft.com/en-us/library/aa364230(v=VS.85).aspx .

Only if you plan to write an application which don't use Win32 subsystem and use NT native subsystem only like a small checkdisk application or disk defragmentation application which run at the beginning of the windows start (see session manager registry key) than you will have advantage in using of NtFsControlFile . In all cases of usual work you should use only DeviceIoControl .

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .