分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)

分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)

ID:41245319

大?。?6.00 KB

頁數(shù):11頁

時間:2019-08-20

分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)_第1頁
分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)_第2頁
分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)_第3頁
分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)_第4頁
分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)_第5頁
資源描述:

《分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(Share simple ways to reduce CPU usage in online games)》由會員上傳分享,免費在線閱讀,更多相關內容在學術論文-天天文庫。

1、分享簡單的降低網(wǎng)絡游戲cpu占用率的方法(SharesimplewaystoreduceCPUusageinonlinegames)Infact,verysimple.MainlyfortheD3Dgame.Themainidea:HookIDirect3DDevice9::Present,inwhichtoaddthesleepfunction.LetthesystemgetmoreCPUtimesliceTestthegame:JianWangthree(asD3D9)Learnallkindsofplug-inpro

2、ductiontechnology,immediatelytoBaidusearch"devilworkshop",clickonthefirststoptogotheretolearn.Concreteimplementationsteps:Direct3DCreate9togetthe1.HOOKinterfacepointertypeLPDIRECT3D9Direct3Dobject,ithasamemberfunctionIDirect3D9::CreateDevice,so,aslongastheDirect3D

3、objectDirect3Dobjectinterfacepointertofindvirtualfunctiontable,thenaccordingtothevirtualfunctiontableIDirect3D9::CreateDevicememoryaddress,youcanhookthisfunction,soastoobtainthetypeLPDIRECT3DDEVICE9deviceobjectpointer,andthenaccordingtothedeviceobjectdeviceobjectp

4、ointertothevirtualfunctiontable,accordingtothevirtualfunctiontabletofindIDirect3DDevice9:Presentaddressinmemory,theHOOK,withsleepfunction.----------------------------------------------------------------------------------------------------//Runjinreferencecode#incl

5、ude#include#pragmacomment(LIB,"D3D9.lib")#pragmacomment(LIB,"D3Dx9.lib")Void,GameD3D_HOOK();IDirect3D9*_stdcallNew_Direct3DCreate9(UINTSDKVersion);HRESULT,_stdcall,New_CreateDeviceLPDIRECT3D9pDx9,UINTAdapter,D3DDEVTYPEDeviceType,HWNDhFocusWind

6、ow,DWORDBehaviorFlags,D3DPRESENT_PARAMETERS*pPresentsentationParameters,IDirect3DDevice9**pPresentturnedDeviceInterface);HRESULT,_stdcall,New_PresentLPDIRECT3DDEVICE9pDxdevice,CONSTRECT*pSourceRect,CONSTRECT*pDestRect,HWNDhDestWindowOverride,CONSTRGNDATA*pDirtyReg

7、ion);LPDIRECT3D9m_pD3D=NULL;theinterfacepointerofthe//Direct3Dobjectvoid*pdirect3dcreate9=null;//direct3dcreate9函數(shù)地址指針void*pcreatedevice=null;/::函數(shù)地址指針CreateDevice函數(shù)void*ppresent=null;//IDirect3DDevice9::目前函數(shù)地址指針在睡眠時間=50;//延時時間字節(jié)direct3dcreate_begin[5];//用于保存direc

8、t3dcreate9入口的5字節(jié)字節(jié)createdevice_begin[5];//用于保存CreateDevice函數(shù)::入口的字節(jié)字節(jié)present_begin[5];//用于保存IDirect3DDevice9::目前入口的5字節(jié)無效gamed3d_hook(){//鉤direct3dcreate

當前文檔最多預覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內容,確認文檔內容符合您的需求后進行下載,若出現(xiàn)內容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。