Jump to content
  • Advertisement
Sign in to follow this  
keethrus

windows registry file type association problem

This topic is 5472 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'm creating a file type association in the windows registry, and everything works fine besides one small part. When I put the "%1" in the registry, it is giving my application the "DOS style" short path and file name instead of the full path and file name. Example: "C:\Progra~1\MyAppN~1\someFi~1.xyz" instead of "C:\Program Files\MyAppName\SomeFileName.xyz" And therefore my app is not able to open it with fopen. I know I could use GetLongFileName( ) but it's not available in Windows 95. There's also an equivalent piece of code that uses FindFirstFile to get the long path/filename, but I'd rather fix the "%1" registry part. I've searched high and low for an answer and come up short! Anybody come into contact with this before and know what's going on? - Jeremiah

Share this post


Link to post
Share on other sites
Advertisement
You should always be able to open a file using the 8.3 filename (it's the long one that may or may not work). Are you sure it isn't the quotes messing it up?

Share this post


Link to post
Share on other sites
My program is receiving:
C:\Progra~1\MyAppN~1\someFi~1.xyz (no quotes)

and then it puts the exact string into fopen, which returns a failure.

- Jeremiah

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!