Jump to content
  • Advertisement
Sign in to follow this  
soconne

GetCommandLine and long filenames

This topic is 5083 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

I've made it so a particular extension is associated with my app. I'm using GetCommandLine to get the arguments and if I drag the file I want to open 'onto' my app's .exe then it gives me the full long filename. But if I double click the file, it caps every word of folders and the filename itself to be that garbage "Progr~\", ect... I put this into the registry under class\\shell\\open\\command myapp.exe "%1" But it double clicking the file always shortens the filenames. Is there a way to get around this?

Share this post


Link to post
Share on other sites
Advertisement
I don't know if there is a way to make Windows behave differently, but maybe you could call GetLongPathName() inside your program if you always want to get the long name.

Share this post


Link to post
Share on other sites
Oh I got it to work. You have to put quotes around your application name in the registry as well. Then it works fine.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!