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 

Stop a module, "Music_prx"

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



Joined: 21 Feb 2008
Posts: 386

PostPosted: Tue Jul 29, 2008 2:53 am    Post subject: Stop a module, "Music_prx" Reply with quote

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