繁体   English   中英

是否有与 Windows 文件 Z8A5DA52ED126447D359E70C07

[英]Is there a Windows driver function that does the equivalent of the Windows file api SeFileAttributes

My question is if there's a Windows Driver function that does the equivalent of the function SetFileAttributesA in the Windows file api. 如果有,我想知道它在 Microsoft 文档中的位置。

如果通过“Windows 驱动程序”function 您的意思是 function 您可以从/在 Kernel 模式代码中调用,那么是的,有一个。

function 是ZwSetInformationFile() - 在wdm.h中定义如下:

NTSYSAPI NTSTATUS NTAPI ZwSetInformationFile(__in HANDLE FileHandle, __out PIO_STATUS_BLOCK IoStatusBlock,
    __in_bcount(Length) PVOID FileInformation, __in ULONG Length, __in FILE_INFORMATION_CLASS FileInformationClass);

您需要将FileInformationClass参数设置为FileAttributeTagInformation ,其中FileInformation参数指向FILE_ATTRIBUTE_TAG_INFORMATION结构。

更多信息/文档可以在这里ZwSetInformationFileFILE_ATTRIBUTE_TAG_INFORMATION 找到

希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM