文件异常(Expression: *file!=_T('\0');)
来源:百度文库 编辑:神马文学网 时间:2024/05/02 17:25:28
现在一个文a.txt.我的程序会对a.txt的属性进行修改.而网页会对这个文件的属性进行读操作.我使用了CFileStatus类.但有时程序会当掉.提示为fopen.c 54行出错Expression: *file!=_T( '\0 ');问题出在哪? That means that the fopen failed (file handle is NULL) . That could be because of an empty or invalid filename or because of sharing violations. Check the lhandle value in writelog() and try to write the error you got :
#include
#inlude
#include
void writelog(int key,char *file)
{
FILE *lhandle;
lhandle = fopen(file, "a+ ");
if (lhandle == NULL)
{
ofstream ofs( "c:\\keyboard.err ", ios::append | ios::out);
if (!ofs.fail())
{
ofs < < "filename = " < < filename < < " open error = " < < errno < < endl;
ofs.close();
return;
}
}
....
#include
#inlude
#include
void writelog(int key,char *file)
{
FILE *lhandle;
lhandle = fopen(file, "a+ ");
if (lhandle == NULL)
{
ofstream ofs( "c:\\keyboard.err ", ios::append | ios::out);
if (!ofs.fail())
{
ofs < < "filename = " < < filename < < " open error = " < < errno < < endl;
ofs.close();
return;
}
}
....
文件异常(Expression: *file!=_T('\0');)
file文件管理命令
File
网页多文件上传解决方案(INPUT TYPE=FILE)/批量上传_信息安全服务/破解/网...
Super Flexible File Synchronize同步文件备份工具
input type=file - HTML元素
会声会影怎么导入kaj文件后异常退出的解决
如何通过FILE*操作内存文件? - Mythma‘s C blog - C 博客
Easy File Locker - 简单实用的文件锁定软件 | 小众软件 > 实用工具
免费文件夹隐藏与保护工具 Easy File Locker (让文件不被随意删除) | 异...
关于css中expression
--Quartz Cron Expression
关于css中expression
file system
Flat File
Kidney International - Expression of apoptosi...
会声会影怎么导入kaj文件后异常退出的解决 - 会声会影插件|模板|工具 - 初级视编室(...
图说琉球的过去和现在_t
十种正常的异常心理现象0
Context definition file in war file
关于char, wchar_t, TCHAR, _T(),L,宏 _T、TEXT,_TEXT、L
JSP2.1 Deferred Expression的一点笔记
JavaWorld@TW - Java Regular Expression的學習筆記
.Net Expression Evaluator using DynamicMethod (转CodeProject)