DeleteFile(L"E:\\test.txt");
/*
HANDLE hFile = CreateFile(L"E:\\test.txt", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS , FILE_ATTRIBUTE_NORMAL, 0);
if (hFile == INVALID_HANDLE_VALUE)
{
return 0;
}
TCHAR pBufWrite[100] = L"200";
DWORD dwBytesToWrite = 100;
DWORD dwBytesWrite = 0;
if (!WriteFile(hFile, pBufWrite, dwBytesToWrite, &dwBytesWrite, NULL)
|| dwBytesWrite == 0)
{
CloseHandle(hFile);
return 0;
}
TCHAR pBufRead[100] = {0,};
DWORD dwBytesToRead = 100;
DWORD dwBytesRead = 0;
if (!ReadFile(hFile, pBufRead, dwBytesToRead, &dwBytesRead, NULL)
|| dwBytesRead == 0)
{
CloseHandle(hFile);
return 0;
}
CloseHandle(hFile);*/
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。