Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1705549
  • 博文数量: 263
  • 博客积分: 1218
  • 博客等级: 少尉
  • 技术积分: 2862
  • 用 户 组: 普通用户
  • 注册时间: 2011-06-19 02:33
文章分类

全部博文(263)

文章存档

2020年(12)

2019年(2)

2018年(10)

2016年(1)

2015年(20)

2014年(115)

2013年(46)

2012年(37)

2011年(20)

分类: C/C++

2014-08-28 17:34:10

不然程序会发生错误,并定位到 __cdecl _lock_file (
  1. void __cdecl _lock_file (  
  2.         FILE *pf  
  3.         )  
  4. {  
  5.         /* 
  6.          * The way the FILE (pointed to by pf) is locked depends on whether 
  7.          * it is part of _iob[] or not 
  8.          */  
  9.         if ( (pf >= _iob) && (pf <= (&_iob[_IOB_ENTRIES-1])) )  
  10.         {  
  11.             /* 
  12.              * FILE lies in _iob[] so the lock lies in _locktable[]. 
  13.              */  
  14.             _lock( _STREAM_LOCKS + (int)(pf - _iob) );  
  15.             /* We set _IOLOCKED to indicate we locked the stream */  
  16.             pf->_flag |= _IOLOCKED;  
  17.         }  
  18.         else  
  19.             /* 
  20.              * Not part of _iob[]. Therefore, *pf is a _FILEX and the 
  21.              * lock field of the struct is an initialized critical 
  22.              * section. 
  23.              */  
  24.             EnterCriticalSection( &(((_FILEX *)pf)->lock) );  
  25. }  


http://blog.csdn.net/leechiyang/article/details/6873952
这里有解决办法: http://kongchuipin.blog.163.com/blog/static/507395992011720480182/

阅读(1126) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~