Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

l3mon

File location as parameter for console app?

This topic is 5201 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! I made a Win32 app and when you drag a file onto it, its location was passed in the command line. Now I''m trying to get the same thing for a console app. Any ideas how I get windows to tell me the file and its location? Thanks for your help in advance.

Share this post


Link to post
Share on other sites
Advertisement
Well, the main() function does have the two arguments, argc and argv, that contain all the items of the command line. And there is also the GetCommandLine() Win32 API call.


Most of the greatest evils that man has inflicted upon man have come through people feeling quite certain about something which, in fact, was false.

-Bertrand Russell, Unpopular Essays, "Ideas That Have Harmed Mankind"

Share this post


Link to post
Share on other sites
I figured it out last night...
I forgot to check all the fields of the pointer.
It''s in the second field if anyone cares.

Share this post


Link to post
Share on other sites

  • 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!