DevCpp / DevC++ 技巧 [熱鍵] [Ctrl] + O : 開啟舊檔 [Ctrl] + I : 搜尋字串 [F9] : 編譯 [F11]: 編譯並執行 *用到 <Winsock2.h> #pragma comment(lib,Ws2_32.lib) 則需要 在編譯選項(Compiler Option) 加入 -lws2_32 * 編譯以下檔案 ------------------------------------------ #include<iostream> #include<Windows.h> #include<psapi.h> using namespace std; int main(int argc,char** argv){ MODULEINFO modInfo; HMODULE hModule = GetModuleHandle(0); GetModuleInformation(GetCurrentProcess(),hModule,&modInfo,sizeof(MODULEINFO)); LPBYTE pAddress = (LPBYTE)modInfo.lpBaseOfDll; printf("Base Address : %x\n",pAddress); system("pause"); return 0; } ------------------------------------------- 出現錯誤 : C:\Users\BlackTea\AppData\Local\Temp\ccFW7yVx.o:GetModuleInformation.cpp:(.text+0x90): undefined...
發表文章
目前顯示的是有「IDE」標籤的文章