How to get own filename of running program?
How to get own filename of running program?
How do I get the filename of my current running program.
Suppose my module is flash0:/vsh/modules/torch.prx, then from inside torch.prx how can I detect its filename. Suppose I rename it to something.prx, it should be able to find its filename as something.prx.
Suppose my module is flash0:/vsh/modules/torch.prx, then from inside torch.prx how can I detect its filename. Suppose I rename it to something.prx, it should be able to find its filename as something.prx.
Actually I've made a replacment vshmain.prx which asks for a password with a pretty GUI, and then launches vshmain_real.prx.
I'm proud to say that I'm sure its the best password protection thingie available at present. I'll release it in 10 mins after i complete the readme.
I also wanted to protect recovery, so i recompiled it to launch recovery_real.prx instead.
I want to avoid compiling it twice and editing the path each time. So I though if I could just have a single file that i'll copy to both vshmain.prx and recovery.prx, and it'll autodetect its own name and will launch vshmain_real.prx or recovery_real.prx correspondingly.
I'm proud to say that I'm sure its the best password protection thingie available at present. I'll release it in 10 mins after i complete the readme.
I also wanted to protect recovery, so i recompiled it to launch recovery_real.prx instead.
I want to avoid compiling it twice and editing the path each time. So I though if I could just have a single file that i'll copy to both vshmain.prx and recovery.prx, and it'll autodetect its own name and will launch vshmain_real.prx or recovery_real.prx correspondingly.
Silly me. I completely forgot to check if recovery was started with any parameters... Will check and see.TyRaNiD wrote:I don't think the module list contains filenames, I could be wrong though, it has been a while. The PSP doesn't need them so it doesn't save them at all.
Does the recovery prx get started with a path? If so could you not just use the logic that if you have a path it is recovery else it is vshmain?
Here's my app:
http://forums.qj.net/f-psp-development- ... 40848.html
http://forums.qj.net/f-psp-development- ... 40848.html