file.Close();
来源:互联网 发布:电脑软件培训中心 编辑:程序博客网 时间:2024/04/28 10:48
CreateFile打开一个文件
HANDLE hDev;
hDev = CreatFile("g:/001.txt", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0 , NULL);
if(hDev == NULL ¦ ¦ hDev == INVALID_HANDLE_VALUE)
{
return FALSE;
}
cFile file;
CFileException pError;
BOOL bFlg = file.Open("g:/002.txt", CFile::modeRead,&pError); //这步的时候出错了,打不开文件啊。超级郁闷。错误号是5,拒绝访问,各位大侠救命
if(!bFlg ¦ ¦ pError != 0)
{
return FALSE;
}
file.Read(...);
file.Close(); /a:蜂鸣,响铃
/b:回退:向后退一格
/f:换页
/n:换行,光标到下行行首
/r:回车,光标到本行行首
/t:水平制表
/v:垂直制表
//:反斜杠
/':单引号
/":双引号
/?:问号
/ddd:三位八进制
/xhh:二位十六进制
/0:空字符(NULL),什么都不做
注:
1,/v垂直制表和/f换页符对屏幕没有任何影响,但会影响打印机执行响应操作。
2,/n其实应该叫回车换行。换行只是换一行,不改变光标的横坐标;回车只是回到行首,不改变光标的纵坐标。
3,/t 光标向前移动四格或八格,可以在编译器里设置
4,/' 在字符里(即单引号里)使用。在字符串里(即双引号里)不需要,只要用
- file.Close();
- sharepoint 2007 force close file
- 由file.Close()引发ShellExecute 无法执行
- File 里面的flush()和close()
- hdfs.DFSClient: Failed to close file 解决办法
- windows batch file : close unused port
- close ()
- close()
- Transfer file over FTP (close ui and get return code)
- file.close()后CopyFile函数执行失败的原因
- Python中file.close()方法的使用与否
- file operate in python (open write read close )
- PHPExcel exception: “Could not close zip file … ”
- what's the close-on-exec file descriptor flag in C
- SecureCRT experienced a fatal error and must close.A crash dump file has been created i
- HDFS append: Failed to close file /sys/global/log/sys_20160716.log. Lease recovery is in prog
- Could not close the output stream for file "hdfs://192.168.190.129:9000/BJ_4.c
- secrurecrt experenced a fatal error and must close.A crash dump file has been created in
- 个人收入证明
- 实验十(无 保护/恢复 现场)
- mysql入门好书推荐
- DrawImage构造缩略图
- CreateFile打开一个文件
- file.Close();
- jcifs-windows密码验证的方式
- 夜夜听雨(三)(中国社会科学院 郑哲)
- 转帖:夜夜听雨(四)(中国社会科学院 郑哲)
- PHP实现网页自动更新块
- 佛心禅话(慧律法师 编撰)
- 虚类和非虚类继承
- GetACP 使用
- 应用层下拷贝以独占方式打开的文件