Jump to content

GetFullPath method


Recommended Posts

Guest Croccy22
Posted

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

Posted

hiya m8

midnight asked me this earlier on your behalf, has he not sent the code on?

Guest spacemonkey
Posted

TCHAR szExecutable[MAX_PATH]

GetModuleFileName(NULL, szExecutable, MAX_PATH);

This should load the current running exe fullpath and name into szExecutable.

Guest Croccy22
Posted

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

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.

Posted

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 :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.