CFileStatus 使用详解
来源:互联网 发布:大数据技能大赛试题 编辑:程序博客网 时间:2024/05/20 04:28
CFileStatus 使用详解
// TTT.cpp : Defines the entry point for the consoleapplication.
#include "stdafx.h"
#include "stdio.h"
#include "afx.h"
#include "shellapi.h"
#include "windows.h"
int main(int argc, char* argv[])
{
// for (int i=0; i<100; i++)
/** {
Sleep(50);
WinExec("C:\\abc\\client9\\Release\\client.exe",SW_MINIMIZE);
}*/
SHFILEINFO sfi;
CFile file;
BOOL bResult = file.Open("c:\\windows\\notepad.exe",CFile::modeRead|CFile::shareDenyNone, NULL);
CFileStatus status;
CFileStatus status2;
file.GetStatus(status2);
file.GetStatus(status);
printf("创建时间:%s\r\n", status.m_ctime.Format("%Y-%m-%d%H:%M:%S"));
printf("修改时间:%s\r\n", status.m_mtime.Format("%Y-%m-%d%H:%M-%S"));
printf("访问时间:%s\r\n", status.m_atime.Format("%Y-%m-%d%H:%M-%S"));
printf("大小:%f\r\n", (float)status.m_size);
printf("文件名称:%s\r\n", status.m_szFullName);
printf("CFileStatus:%d\r\n", sizeof(CFileStatus));
printf("%ul", (DWORD)-1);
if (0 != memcmp((char*)&status, (char*)&status2, sizeof(CFileStatus)))
{
printf("asdfasdfasdfasdf\r\n");
}
return 0;
}
- CFileStatus 使用详解
- CFileStatus使用
- pdf详解 iTextSharp 使用详解
- 【Git使用详解】EGit使用详解
- POI使用详解 Apache POI使用详解
- function对象使用使用详解
- CheckStyle使用详解
- VSS使用详解释
- JDom使用详解
- JCoverage使用详解
- 正则表达式使用详解
- showModalDialog(),showModelessDialog()使用详解
- Ghost 使用详解
- SSI使用详解
- GDB使用详解
- SSI使用详解
- SSI使用详解1
- 正则表达式使用详解
- Javascript 赋值机制详解
- PowerDesigner V16.5 安装文件 及 破解文件
- 从文本文件中读取注册服务条款
- 杨辉三角
- SPFA ---可以解决dijsktar出现负权的
- CFileStatus 使用详解
- 数据库的三级模式:外模式、模式和内模式
- 提高Android Support Library稳定性的三个关键方法
- 第十三周 项目4:(1)
- js实例属性和原型属性示例详解
- UML中的关系
- 曹操乃奸雄----(奸贼、奸雄、枭雄定义)、曹操他爸花了一亿元钱买官来的
- 第13周项目5-字符串操作(2.3)
- [Swift]可选链和ARC引用计数