Sign in to follow this  
jtmerchant

How to Run a Program and Give It Data?

Recommended Posts

I'm making a sort of launch program for the user to log in and patch/update their version of the game, which then launches the actual game. I was wondering how to launch the game with the information such as username/password, etc. I've considered using files, writing with the launcher and reading with the game, but this seems too insecure. What can I do?

Share this post


Link to post
Share on other sites
The two ways that immediately come to mind are passing the username/password as command line arguments or place the username/password into shared memory. The launcher creates the shared memory, creates the game process, which opens the shared memory.

Search MSDN for CreateFileMapping/OpenFileMapping.

Share this post


Link to post
Share on other sites
Quote:
Original post by jtmerchant
I'm making a sort of launch program for the user to log in and patch/update their version of the game, which then launches the actual game. I was wondering how to launch the game with the information such as username/password, etc. I've considered using files, writing with the launcher and reading with the game, but this seems too insecure. What can I do?


I would say store the file names in the registry, but make the user re-enter passwords. Just think about the security issues if you tried to store them *anywhere*. I think the safest bet is to inconvience the user just that once per update.

Or, you can update the game without needing a password. If it is server based, allow them to login afterwards to play. The design I am talking about is the one StarCraft uses. You simply connect to the server, update, then logon.

Just a few ideas.
- Drew

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