forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to reload a module ?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
poison



Joined: 14 Dec 2006
Posts: 17

PostPosted: Sun Jan 21, 2007 4:06 pm    Post subject: how to reload a module ? Reply with quote

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..

Quote:

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....

Quote:

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


need a hand.....
Back to top
View user's profile Send private message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Wed Jan 24, 2007 12:39 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
poison



Joined: 14 Dec 2006
Posts: 17

PostPosted: Wed Jan 24, 2007 2:26 pm    Post subject: Reply with quote

But i cant load my registry.prx if the original registry service is running...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group