Guest Croccy22 Posted July 29, 2003 Report Posted July 29, 2003 Can someone tell me how to find the full path of the currently running applications. I have found the code before on another forum but I can't find it now I need it. I want this so i can load a sound file from the same folder as the .exe file. Thanx Matt
Guest muff Posted July 30, 2003 Report Posted July 30, 2003 hiya m8 midnight asked me this earlier on your behalf, has he not sent the code on?
Guest spacemonkey Posted July 30, 2003 Report Posted July 30, 2003 TCHAR szExecutable[MAX_PATH] GetModuleFileName(NULL, szExecutable, MAX_PATH); This should load the current running exe fullpath and name into szExecutable.
Guest Croccy22 Posted July 30, 2003 Report Posted July 30, 2003 muff, yeah have got it now thanx. Spacemonkey. thing is i wanted the path without the name of the .exe file. I know if it quite easy to do this using find and replace but to be honest i really couldn't be bothered yesterday and remember seeing the code kicking around somewhere. Anyway, thanx all Matt http://www.spvsoft.co.uk
Guest spacemonkey Posted July 30, 2003 Report Posted July 30, 2003 So you've got a working bit of code then? Otherwise the string functions to cut off the exe name is pretty trivial and I can post them.
Guest muff Posted July 30, 2003 Report Posted July 30, 2003 spacemonkey: think he's got the code I sent over now, so he should be alright why is it that path/string functions on these phones are such a royal pain in the arse ? ah, well the joys of development I suppose :)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now