Skip to main content
GameDev.net gamedev.net
🔒 Locked

command-line arguments in Win32

Started by Slather Feb 29, 2008 at 6:10 PM 1 replies 1.3k views
Original Post
Slather
Slather
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?
SiCrane
SiCrane
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.
Slather
Slather
Yep, that was it! Thanks for the prompt reply!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.