|
for(j=0;j<1000;j++)
{
userfile = CreateFile ( paras_path,
GENERIC_WRITE,
FILE_SHARE_WRITE,
NULL,
CREATE_ALWAYS ,
FILE_ATTRIBUTE_NORMAL,
NULL);
if(userfile == INVALID_HANDLE_VALUE)
{
debugfile<<"create userfile error!"<
}
for(i=0;i<100000;i++)
{
if(WriteFile(userfile,user_buffer,28,&bb,NULL)==false)
{
debugfile<<"write user data error!"<
}
else
{
FlushFileBuffers(userfile);
}
}
debugfile<<"write file index:"<
CloseHandle(userfile);
DeleteFile(paras_path);
Sleep(1000);
} |
|