[Win32utils-devel] ZwXX functions
phasis at gmail.com
Tue Apr 29 22:15:04 EDT 2008
2008/4/30 Berger, Daniel <Daniel.Berger at qwest.com>:
> Hi all,
> I noticed that some of the Zw functions would be very handy to use.
> While they're exported by NTDLL, it seems they're part of the Windows
> Driver Kit, and those headers don't ship with Visual C++ by default. Or
> do they? I don't have them with Visual C++ 8 anyway.
> What I'm mainly after is the ZwQueryInformationFile for use with
> File::Stat, so I can get information more easily from a handle. This
> would be useful for a custom IO#stat implementation, where I'll have a
> fileno but not a file name.
> While it's technically part of the WDK, there's no reason it can't be
> used for regular file operations as well.
> Any suggestions?
You cannot call ZwXX functions directly in application.
Instead, there is NtXX functions including NtQueryInformationFile.
Refer to http://www.codeguru.com/Cpp/W-P/system/processesmodules/article.php/c2827/
It has sample program and source code availabe.
More information about the win32utils-devel