檢測檔案到末尾
同步操作
// Attempt a synchronous read operation bResult = ReadFile(hFile, &inBuffer, nBytesToRead, &nBytesRead, NULL); // Check for eof if (bResult && nBytesRead == 0, ) { // At the end of the file
}
非同步操作
// Attempt to initiate an asynchronous read operation. bResult = ReadFile(hFile, &inBuffer, nBytesToRead, &nBytesRead, &gOverlapped); // Check if there was a problem. if (!bResult) { switch (dwError = GetLastError()) { case ERROR_HANDLE_EOF: // At the end of the file. break; case ERROR_IO_PENDING: // I/O pending. break; } } // Check on an asynchronous read operation. bResult = GetOverlappedResult(hFile, &gOverlapped, &nBytesRead, TRUE); // Check if there was a problem. if (!bResult) { switch (dwError = GetLastError()) { case ERROR_HANDLE_EOF: // At the end of the file } }
相關文章
- linux sed命令:顯示關鍵字到檔案末尾的內容Linux
- 忽略檢測png檔案
- 為繞過檢測,攻擊者將惡意Word檔案嵌入到PDF檔案中
- 檢測檔案編碼,轉換檔案編碼
- 檔案包含漏洞檢測工具fimap
- 檔案上傳漏洞防範-檔案型別檢測型別
- 檔案上傳——客戶端檢測繞過(JavaScript檢測)(一)客戶端JavaScript
- PE檔案檢測DOS頭\NT頭
- 檢測input file檔案是否上傳
- iOS文字檔案的編碼檢測iOS
- Duplicate Detective for Mac(重複檔案檢測工具)Mac
- 【exp】快速檢測資料檔案壞塊
- 滲透測試對檔案包含漏洞網站檢測網站
- 關閉單個檔案eslint的檢測EsLint
- 檢測真實的檔案型別函式型別函式
- Android檔案下載之進度檢測Android
- shell檢測檔案是windows格式還是unixWindows
- hadoop 將檔案上傳到指定的datanode 檢視檔案所在的塊Hadoop
- 檢測根目錄帶bom頭資訊的檔案
- SQL Server資料檔案增長檢測(三)RFSQLServer
- SQL Server資料檔案增長檢測(一)FMSQLServer
- Oracle recover後如何檢測檔案的完整性Oracle
- 效能測試筆試 50 題 (答案在末尾)筆試
- PCL——txt檔案轉到PCD檔案
- Recoil Input 游標位置被重置到末尾的問題
- swap檔案檢視
- 檢視大檔案
- 黑客攻防應用:利用密碼檔案檢測攻擊黑客密碼
- js檢測上傳檔案型別程式碼例項JS型別
- 檔案檢測函式 feof, ferror,clearerr C庫函式函式Error
- C# 檢測真實的檔案型別函式C#型別函式
- iozone 一個檔案系統的效能檢測工具。
- 如果再刪除檔名(2)的操作,linux系統檢測到Linux
- 網站可以檢測到代理嗎?網站
- asm拷貝檔案到檔案系統ASM
- 6. 檢測兩臺機器上檔案的差異
- HPUNIX下表空間檔案系統到裸裝置測試
- 從C檔案到可執行elf檔案