效果 源碼 #include #include #include //不要用Unicode編碼,反正我用這個編碼后不能正確執(zhí)行 #define BUFSIZE 1024//文...
效果 源碼 #include #include #include //不要用Unicode編碼,反正我用這個編碼后不能正確執(zhí)行 #define BUFSIZE 1024//文...
效果 和上一個方法區(qū)別在于如紅框處,驅(qū)動名返回的是以\\?\volume{GUID}形式,并且多出了之前沒有的一個系統(tǒng)保留磁盤 源碼 #include #include #d...
說明 出現(xiàn)了很多問題,第一次執(zhí)行時直接程序崩潰,原因是printf函數(shù)中將GetLastError函數(shù)的返回值設(shè)置成了%s?改回%d后就正常了.修改后第二次執(zhí)行,提示掛載錯誤...
#include #include #include #define BUFSIZE 512 int main(int argc, PCHAR argv[]){ CHAR s...
效果 源碼 #include #include //獲取磁盤空間信息 BOOL GetDiskSpaceInfo(LPCSTR pszDrive){ DWORD64 qwFr...
效果 源碼 #include #include int main(int argc, PCHAR argv[]){ //-d刪除文件 if (lstrcmp("-d", ar...
說明 我只能說Unicode很坑,所以我改成了ANSI編碼. 效果 源碼 #include #include //獲取文件內(nèi)容以16進制打印 DWORD ReadFileCo...
效果 源碼 #include #include int main(int argc, PCHAR argv[]){ //在程序當(dāng)前目錄創(chuàng)建 "當(dāng)前目錄" 目錄 LPTSTR ...
效果 源碼 #include #include int main(int argc, PCHAR argv[]){ //當(dāng)前路徑 CHAR szCurrentDirector...
效果 源碼 #include #include DWORD EnumerateFileInDrectory(LPSTR szPath){ WIN32_FIND_DATA Fi...
效果 源碼 #include #include DWORD dwTotalFileNum = 0; DWORD ListAllFileInDrectory(LPSTR szP...
效果 源碼 #include #include DWORD ShowFileAttributes(LPSTR szPath);//獲取并顯示文件屬性 DWORD ShowFi...
說明 圖1:執(zhí)行正常 圖2:0x20000處的32字節(jié)已經(jīng)給修改 圖3:0x28804處的值讀取正確 效果 源碼 #include #include #define BUFF...
說明 這里包含兩個程序,名字可看文章標(biāo)題和瀏覽器標(biāo)題 第一個代碼是第一個參數(shù)的,第二個代碼是第二個程序的 效果圖示兩個程序先后執(zhí)行的效果,先執(zhí)行程序一,再執(zhí)行程序二 效果 源...
效果 源碼 #include #include #include #include #include #define BUFSIZE 512 //從文件句柄獲取文件路徑 BO...
堆管理 API說明 HeapCreate為進程創(chuàng)建堆,返回堆句柄 GetProcessHeap獲取當(dāng)前進程中的一個堆,返回句柄 GetProcessHeaps獲得進程中所有堆...
結(jié)果 源碼 #include #include int main(int argc, PCHAR argv[]){ SYSTEM_INFO si; GetSystemInfo...
說明 第一次參數(shù) -a 創(chuàng)建一個10頁大小的堆,所以在分配堆時出錯直接退出,沒有銷毀堆? 第二次沒有參數(shù),說明創(chuàng)建一個可增長的堆,成功分配11頁大小的堆 第三次使用參數(shù) -s...
效果 源碼 #include #include int main(int argc, PCHAR argv[]){ LPVOID lpMem;//內(nèi)存地址 HGLOBAL h...
效果 源碼 #include #include int main(int argc, PCHAR argv[]){ SIZE_T sizeVirtual = 4000;//大...