OBJECT_ATTRIBUTES oa;
FILE_NETWORK_OPEN_INFORMATION fnoi;
UNICODE_STRING strPath = RTL_CONSTANT_STRING(L"\\??\\E:\\安装软件\\win7旗舰版.iso");
LARGE_INTEGER li_temp; char strTime[ArrayLength] = {0};
ANSI_STRING as;
TIME_FIELDS tf;
InitializeObjectAttributes(&oa, &strPath, OBJ_KERNEL_HANDLE, NULL, NULL);
ZwQueryFullAttributesFile(&oa, &fnoi); ExSystemTimeToLocalTime(&fnoi.CreationTime, &li_temp);
RtlTimeToTimeFields(&li_temp, &tf);
RtlInitEmptyAnsiString(&as, strTime, ArrayLength);
RtlStringCbPrintfA(as.Buffer, ArrayLength, "%d-%d-%d %d:%d:%d\n", tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second);
KdPrint(("创建时间:%s\n", as.Buffer)); ExSystemTimeToLocalTime(&fnoi.LastWriteTime, &li_temp);
RtlTimeToTimeFields(&li_temp, &tf);
RtlInitEmptyAnsiString(&as, strTime, ArrayLength);
RtlStringCbPrintfA(as.Buffer, ArrayLength, "%d-%d-%d %d:%d:%d\n", tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second);
KdPrint(("修改时间:%s\n", as.Buffer)); ExSystemTimeToLocalTime(&fnoi.LastAccessTime, &li_temp);
RtlTimeToTimeFields(&li_temp, &tf);
RtlInitEmptyAnsiString(&as, strTime, ArrayLength);
RtlStringCbPrintfA(as.Buffer, ArrayLength, "%d-%d-%d %d:%d:%d\n", tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second);
KdPrint(("访问时间:%s\n", as.Buffer)); KdPrint (("文件大小:%I64d", fnoi.AllocationSize.QuadPart));

版权声明:本文为博主原创文章,未经博主允许不得转载。

最新文章

  1. Linux 查找文件并删除文件内容
  2. img和css背景的选择
  3. XML 解析器
  4. 如何为libs目录下的jar包关联源代码
  5. LeetCode10 Regular Expression Matching
  6. Android系统SVC命令教程
  7. jquery中json数据转换为字典
  8. My.Ioc 代码示例——实现自动注册/解析
  9. collections——高性能容器数据类型
  10. Spinner样式大全
  11. java自学者的福音
  12. 分布式配置管理--百度disconf搭建过程和详细使用
  13. [技术]浅谈c++ this指针
  14. tr 命令详解
  15. HDU ACM 2066 一个人的旅行
  16. 转载 .Net多线程编程—任务Task https://www.cnblogs.com/hdwgxz/p/6258014.html
  17. magrittr管道操作符使用解释(一)
  18. java 软件开发面试宝典
  19. LCD显示——点阵字体
  20. 敏捷项目管理架构(APMF)

热门文章

  1. docker学习笔记-05:Docker安装mysql和redis
  2. SystemVerilog Assertion 设计、调试、测试总结(3)
  3. spring mvc ,spring boot 整合swagger
  4. question1 赋值运算操作符
  5. Day3-O-Median POJ3579
  6. IOS 常用功能代码
  7. (转)spring mvc 中文乱码问题解决
  8. BUU easyre
  9. 2017 青岛网络赛 Chenchen, Tangtang and ZengZeng
  10. CentOS configuration uses the SFTP server