獲取系統當前的程序及模組資訊

2021-09-30 06:38:31 字數 769 閱讀 5410

1:bool enumprocesses(

dword * lpidprocess,

dword   cb,

dword * cbneeded

); 獲取當前系統的程序id列表。lpidprocess為儲存程序id的陣列,cb為陣列大小,cbneeded為實際的系統程序數

2:handle openprocess(

dword dwdesiredaccess,

bool binherithandle,

dword dwprocessid

); 獲取某程序的控制代碼。dwdesiredaccess為訪問標識,binherithandle為控制代碼繼承標識,dwprocessid為程序id

3:bool enumprocessmodules(

handle hprocess,

hmodule *lphmodule,

dword cb,

lpdword lpcbneeded

); 獲取某一程序的模組列表。hprocess為程序控制代碼,lphmodule為儲存模組控制代碼的陣列,cb為陣列大小,lpcbneeded為程序實際的模組數

4:dword getmodulebasename(

handle hprocess,

hmodule hmodule,

lptstr lpbasename,

dword nsize

); 獲取模組名稱。hprocess為程序控制代碼,hmodule為模組控制代碼(為n

C Process獲取當前程序資訊

1.獲取當前程序資訊整理 process.getcurrentprocess 返回當前程式的程序物件。process cur process.getcurrentprocess 當前程序的id console.writeline cur.id 獲取關聯的程序的終端服務會話識別符號。console.w...

獲取系統的程序資訊

要想獲取系統的程序資訊,有個很好的方法,就是用toolhelp,其提供的介面可以方便的滿足你的要求,如下 include 首先匯入標頭檔案 pe就是我們獲取的程序結構體 dosomething fok process32next m hsnapshot,pe 還有嗎?其中結構體processentr...

用java 獲取當前系統資訊的

public static void main string args throws exception 1.os.name 作業系統的名稱 2.os.arch 作業系統的架構 3.os.version 作業系統的版本 4.file.separator 檔案分隔符 在 unix 系統中是 5.pat...