some problem about list a module imported nids

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
cooleyes
Posts: 123
Joined: Thu May 18, 2006 3:30 pm

some problem about list a module imported nids

Post by cooleyes »

I try to use the code to list all imported lib and nids ,
but the values of "stubentry->nidtable" is not nids, :(

Code: Select all

	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&#40;i < stubLen&#41;
		&#123;
			stubentry = &#40;struct SceLibraryStubTable *&#41; &#40;stubTab + i&#41;;
			
			sceIoWrite&#40;fd, stubentry->libname, strlen&#40;stubentry->libname&#41;&#41;;
			sceIoWrite&#40;fd, stubentry->nidtable, stubentry->stubcount*4&#41;;
			
			i += &#40;stubentry->len * 4&#41;;
		&#125;
		sceIoClose&#40;fd&#41;;
	&#125;
Post Reply