Jump to content
  • Advertisement
Sign in to follow this  

program's directory

This topic is 4723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi guys, i am making a screen saver and i know that data files that the program uses should be in "windows" directory. so i want to make the paths with the exe's directory at the beginning of the program. i mean i want to use "path+data/abc.bmp" so that path will be the exe's directory and no need to add files to windows directory. get it? how can i get the running program's folder? can i make something else for a screen saver in windows? thank you..

Share this post


Link to post
Share on other sites
Advertisement
Use GetModuleFileName and remove the exe-filename. That's 100% always the path your exe is in.

BTW, it'd probably be nice for the user if you don't put your resources in the windows folder too, but in a separate place.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!