Home | Gaming | Programming | Play Online | Contact | Keyword Query
Games++ Games & Game Programming

GAMES++
Games++ Home
Games++ Gaming
Games++ Programming
Beta Testing Games
Free Online Games
Hints & Cheats

BROWSER UTILITIES
E-mail This Page
Add to Favorites

SITE SEARCH

Web Games++

AFFILIATES
Cheat Codes
Trickster Wiki
Game Ratings
Gameboy Cheats
PlayStation Cheats
BlackBerry Games
Photoshop Tutorials
Illustrator Tutorials
ImageReady Tutorials

ADVERTISEMENT

ADVERTISEMENT

System Parameters

Xbox Programming & Development

/*

Reads the system's parameter settings and returns the string it was executed with.

Incredible useful for debugging and for programs that care where and how they are started.

*/

char *GetParams( void )
{
	DWORD error=0;
	DWORD pdwLaunchDataType;
	static LAUNCH_DATA pLaunchData;

	error = XGetLaunchInfo( &pdwLaunchDataType,&pLaunchData);

	if( error == ERROR_NOT_FOUND )
	return 0;

	if( error == ERROR_SUCCESS )
	{
		switch(pdwLaunchDataType)
		{
			case LDT_FROM_DASHBOARD:
				return (char*)&pLaunchData;
				break;
			case LDT_FROM_DEBUGGER_CMDLINE:
				return (char*)&pLaunchData;
				break;
			case LDT_TITLE:
				return (char*)&pLaunchData;
				break;
			default:
				return (char*)&pLaunchData;
				break;
		}
	}
}

Copyright © 1998-2007, Games++ All rights reserved. | Privacy Policy