How to use vshKernelLoadExecVSHMs2 ?

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

Moderators: cheriff, TyRaNiD

Post Reply
gff_cruner
Posts: 11
Joined: Mon May 01, 2006 11:13 am
Location: La Coruna - Spain

How to use vshKernelLoadExecVSHMs2 ?

Post by gff_cruner »

Hi.

I´m developing an application that can launch some others. It run in kernel mode and, because that, i want to launch other app with kernel mode functions.

I heard about vsh functions like vshKernelLoadExecVSHMs2 and its sce equivalent sceKernelLoadExecVSHMs2. I think i have all the files i need, like "pspvshbridge.h" and "psploadexec_kernel.h", this are included in the proyect and makefile. I also fill the SceKernelLoadExecVSHParam structure which is passed to these functions but i have two results:

If i call sceKernelLoadExecVSHMs2, in spite of that function is defined in the include files listed up there, i get the error "undefined reference to sceKernelLoadExecVSHMs2" from compiler.

But, if i use vshKernelLoadExecVSHMs2 , the compilation is successful but, using psplink to execute the app, i get an error like "Can´t load module..." from pcterm command line. If i launch the application from the XMB, the psp freezes.

Thanks for any help.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

You shouldn't really use the vsh* functions :)
As to the function not being there, try calling LoadExecForKernel_28D0D249() instead, as sometimes the SDK has those kind of names...
gff_cruner
Posts: 11
Joined: Mon May 01, 2006 11:13 am
Location: La Coruna - Spain

Post by gff_cruner »

Thanks adrahil, that function works :)

The strange thing is that the compiler send the warning "implicit declaration of function 'LoadExecForKernel_28D0D249'". Maybe I´m not including the correct files?

Before your post i tried to execute the apps with sceKernelLoadExec and... it also works! so, somebody knows which is really the difference between sceKernelLoadExec and this other functions?
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

Sorry i forgot to mention, you indeed have to add "extern int LoadExecForKernel_28D0D249(...)" in your file, where in the "..." you put the params ^^
Before your post i tried to execute the apps with sceKernelLoadExec and... it also works! so, somebody knows which is really the difference between sceKernelLoadExec and this other functions?
Not much.... they're each wrappers of each other with some layers added onto them...
gff_cruner
Posts: 11
Joined: Mon May 01, 2006 11:13 am
Location: La Coruna - Spain

Post by gff_cruner »

Thanks a lot adrahil !!

The app run perfectly now :)
Post Reply