cooleyes
Joined: 18 May 2006 Posts: 125
|
Posted: Fri Oct 19, 2007 1:50 pm Post subject: some problem about list a module imported nids |
|
|
I try to use the code to list all imported lib and nids ,
but the values of "stubentry->nidtable" is not nids, :(
| Code: |
struct SceLibraryStubTable *stubentry;
SceModule *pMod;
void *stubTab;
int stubLen;
pMod = sceKernelFindModuleByUID(uid);
if(pMod != NULL)
{
int i = 0;
stubTab = pMod->stub_top;
stubLen = pMod->stub_size;
SceUID fd = sceIoOpen("ms0:/lib_nids.txt", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
while(i < stubLen)
{
stubentry = (struct SceLibraryStubTable *) (stubTab + i);
sceIoWrite(fd, stubentry->libname, strlen(stubentry->libname));
sceIoWrite(fd, stubentry->nidtable, stubentry->stubcount*4);
i += (stubentry->len * 4);
}
sceIoClose(fd);
}
|
|
|