Sign in to follow this  
Slather

command-line arguments in Win32

Recommended Posts

Hi, I'm using VC++ 2005 and XP, with SDL so here's my question: Is there some fundamental difference between program arguments given at the prompt or in the IDE as debug command args, and arguments from an icon thats dropped into the executable? I've printed out the args for these cases and they're all exactly the same, but when I drag a file into my program's icon, my app crashes. Why would it run one way and not the other when the arguments appear to be exactly the same?

Share this post


Link to post
Share on other sites
The working directory may be different depending on how the application is launched. If you do anything that explicitly or implicitly relies on the current directory, your application may fail depending on how it's launched.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this