win32 檔案系統

2021-10-05 15:27:34 字數 908 閱讀 3590

​ 檔案系統是指作業系統用於管理磁碟上檔案的方法和資料結構:換句話說就是在磁碟上如何組織檔案的方法。

getlogicaldrives()——》沒有引數,返回值就是當前作業系統有幾個卷

getlogicaldrivestrings

getdrivetype根據返回值去判斷什麼型別,可查詢msdn文件來看返回值對應的型別

getvolueinformation(

​ "a:\\", //in 磁碟驅動器**字串

​ sevolumnename, //out 磁碟驅動器卷標名稱

260, //in 磁碟驅動器卷標名稱長度

&dwvolumneserial, //out 磁碟驅動器卷標序列號(不是硬碟序列號,該號是硬碟出廠時生產廠家位區別產品設定的)

&dwmaxlength, //out 系統允許的最大檔名長度

&dwfilesystem, //out 檔案系統標識

szfilesystem, //out 檔案作業系統名稱

260 //in 檔案作業系統名稱長度

);

createdirectory();removedirectory();movefile();getcurrentdirectory();

setcurrentdirectory();

Win32檔案操作

開啟檔案的示例 handle hsrcfile createfile text main.cpp generic read,file share read,null,open existing,file attribute normal,null if hsrcfile invalid handle...

Win32學習筆記 檔案系統

一windows卷 volumn 1.卷的獲取 getlogicaldrivers 返回乙個dword值,這個值的沒個位代表是否存在相應的卷 getlogicadriverstrings 獲取乙個卷的碟符的字串。void showvolumn getlogicaldrivestrings max p...

Win32 檔案的讀寫操作

檔案的寫操作 writefile 函式的宣告如下 bool writefile handle hfile,lpcvoid lpbuffer,dword nnumberofbytestowrite,lpdword lpnumberofbyteswritten,函式詳情見 實戰 寫入數字 寫入英文本母 ...