欢迎来到天天文库
浏览记录
ID:9494541
大小:79.50 KB
页数:12页
时间:2018-05-01
《windows ce api机制初探》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、WindowsCEAPI机制初探 --[1-处理器是0xFFFFC800,而其它处理器是0x00005800。偏移KINFO_OFFSET是UserKInfo数组,里面保存了重要的系统数据,比如模块链表、内核堆、APIsetpointers表(SystemAPISets)。《GR等。基于句柄的API索引定义在PUBLICMONOAKINCpsyscall.h中,如:HT_EVENT、HT_APISET、HT_SOCKET等。 SystemAPISets共有32个CINFO结构的APIset,通
2、过遍历SystemAPISets成员,可以列出系统所有API。其中CINFO的结构在PRIVATEethods; /*06:#ofmethodsindispatchtable*/ constPFNVOID*ppfnMethods;/*08:ptrtoarrayofmethods(inserveraddressspace)*/ constDASK 18#defineKINX_APISETS 24#defineUserKInfo ((long*)(PUserKData+KINFO_OFFSET
3、))//pointertostructProcessdeclaredinKernel.h.typedefvoid*PPROCESS;//IpApis():#definePROCESS_NUM_OFFSET 0 //processnumber(indexoftheslot)#definePROCESS_NAME_OFFSET0x20//pointertotheprocessname//AlsodeclarestructureCINFO,ation//aboutanAPI(originallydec
4、laredin //PRIVATEethods; /*06:#ofmethodsindispatchtable*/ constPFNVOID*ppfnMethods;/*08:ptrtoarrayofmethods(inserveraddressspace)*/ constDWORD*pdethodsignatures*/ PPROCESS pServer; /*10:ptrtoserverprocess*/}CINFO; /*cinfo*/#define12345下一页——感谢阅读这
5、篇文章,..,NUM_SYSTEM_SETS32/*------------------------------------------------------------------- FUNCTION:ProcessAddress PURPOSE: returnsanaddressofmemoryslotforthegivenprocessindex. PARAMETERS: BYTEp_byProcNum-processnumber(slotindex)betemoryslot.----
6、---------------------------------------------------------------*/inlineDain(HINSTANCEhInstance, HINSTANCEhPrevInstance, LPTSTR lpCmdLine, int nCmdShoissions=0; if((fp=fopen(apis.txt,pAPIs:); __try { //Getaccesstome
7、moryslotsofotherprocesses l_dissions=SetProcPermissions(-1); CINFO**l_pSystemAPISets=(CINFO**)(UserKInfo[KINX_APISETS]); for(inti=0;i<NUM_SYSTEM_SETS;i++) { CINFO*l_pSet=l_pSystemAPISets[i]; if(!l_pSet) { continue;
8、 } LPBYTEl_pServer=(LPBYTE)l_pSet->pServer; fprintf(fp, APIset:%02X acName:%.4s disp:%d type:%d cMethods:%d ppfnMethods:%08X pde, l_pSet->disp, l_pSet->type, l_pSet->cMethods,
此文档下载收益归作者所有