//统计文件行数
int frows(HANDLE hFile)
{
int ret=0;
DWORD filesize=GetFileSize(hFile,NULL);
char* buffer=new char[filesize+1];
memset(buffer,0,filesize+1);
DWORD readsize;
ReadFile(hFile,buffer,filesize,&readsize,NULL);
int i;
for(i=0;i<(int)filesize;i++)
{
if(buffer[i]!='\n')
{
}
else
{
ret++;
}
}
if(buffer[(int)filesize-1]!=0x0A) ret++;
delete buffer;
return ret;
}