ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Tue Jul 29, 2008 2:53 am Post subject: Stop a module, "Music_prx" |
|
|
Hi,
I'm try to unload Music_prx plugin, because whit it I've some problems!
I've writed this function:
| Code: |
// Unload Music_prx
SceModule2* Module2 = ne0h_KernelFindModuleByName("Music_prx");
if(Module2!=NULL)
{
printf("Try to unload...\n");
ne0h_KernelStopUnloadModule(Module2->modid);
}
else{
printf("\nMusic_prx s not loaded!\n");
}
|
The main programm is user mode, and the functions ne0h_* is exported from kernel mode prx's...
I've a lot of function in this prx and all works fine...
This is the exported functions:
| Code: |
int ne0h_KernelStopUnloadModule(SceUID modID)
{
k1 = pspSdkSetK1(0);
int status;
sceKernelStopModule(modID, 0, NULL, &status, NULL);
sceKernelUnloadModule(modID);
pspSdkSetK1(k1);
return 0;
}
SceModule2* ne0h_KernelFindModuleByName(const char *modname)
{
k1 = pspSdkSetK1(0);
SceModule2* Module2 = sceKernelFindModuleByName(modname);
pspSdkSetK1(k1);
return Module2;
}
|
The programm crash while trying to stop\unload the module... |
|