how to reload a module ?

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

Moderators: cheriff, TyRaNiD

Post Reply
poison
Posts: 17
Joined: Thu Dec 14, 2006 11:07 pm

how to reload a module ?

Post by poison »

I want to write a OE plugin .it stop and unload the original registry.prx then load a new registry.prx...

i tried to coding like this..
strcpy(file, "ms0:/seplugins/in/registry.prx");

while ((mod = sceKernelFindModuleByName("sceRegistry_Service")))
{
sceKernelStopModule(mod->modid, 0, NULL, NULL, NULL);
sceKernelUnloadModule(mod->modid);
}

uid = sceKernelLoadModuleMS(file, 0, NULL);

uid = sceKernelStartModule(uid, strlen(file)+1, file, NULL, NULL);
but it gave me a black screen while stop and unload the module...it seems that the sceRegistry_Service cant be stopped....
while ((mod = sceKernelFindModuleByName("sceRegistry_Service")))
{
sceKernelStopModule(mod->modid, 0, NULL, NULL, NULL);
sceKernelUnloadModule(mod->modid);
}
need a hand.....
FreePlay
Posts: 71
Joined: Wed Jan 04, 2006 6:53 pm
Location: Schenectady, New York, USA

Post by FreePlay »

Stopping the registry service would be a *bad* idea, since the other modules likely would no longer be able to read or modify any system settings.
poison
Posts: 17
Joined: Thu Dec 14, 2006 11:07 pm

Post by poison »

But i cant load my registry.prx if the original registry service is running...
Post Reply