   launching app with DirectPlay
  Hi there.I was working in a project without directplay API, a program that launchs a game at a certain time. Just like MSN Mensager does(you can start a game GUID registered without the need to set configurations like the host's IP).But that games aren't launched by command-line(as far as I know), but somehow the parametters are passed.I'm a newbie at DX, all I wanna do is to call the game and order it to host or to connect to a IP. Someone please tell me how, or show me examples.I defined the GUID to be called and initializated the DX thing, but nothing. All that tutorials arroud act as if the programmer couldn't call the game from the outside, with separed executables. But msn, all seeing eye, gamespy, xfire and kali does that all the time... how?...Thanks. And sory for my bad english.   
  If you're trying to run external programs and you're using windows(which I take it you are with DirectPlay) then you could try ShellExecute. However the programs you're calling MUST allow you to pass arguments through the command line(in the case of ShellExecute, that's lpParameters).   ;Quote:Original post by ScetIf you're trying to run external programs and you're using windows(which I take it you are with DirectPlay) then you could try ShellExecute. However the programs you're calling MUST allow you to pass arguments through the command line(in the case of ShellExecute, that's lpParameters).But I dunno what's the parameter. I wonder if someone from this directx forum knows it. It may be a padronized DIRECTPLAY parameter, if it's passed that way, becouse if you get an old msn version it'll still see the most modern games and launch them without trouble...   ;  If i understand you right you want to order a DirectPlay-powered game to connect to a server (of which you pass the IP).If the game is correctly set up you use the IID_IDirectPlayLobby3A class. Once you have acquired all the needed objects via enumeration you start the game like this:HRESULT RunApplication( LPDIRECTPLAYLOBBY3A lpDPlayLobby, LPGUID lpguidApplication, LPGUID lpguidInstance, LPGUID lpguidServiceProvider,   LPVOID lpAddress, DWORD dwAddressSize, LPSTR lpszSessionName, LPSTR lpszPlayerName, BOOL bHostSession, DWORD dwMaxPlayers ){  DPSESSIONDESC2  sessionInfo;  DPNAME playerName;  DPLCONNECTION    connectInfo;  HRESULT  hr;  if ( lpDPlayLobby == NULL )  {    return DPERR_NOINTERFACE;  }  // fill out session description  ZeroMemory( &sessionInfo, sizeof( DPSESSIONDESC2 ) );  sessionInfo.dwSize = sizeof( DPSESSIONDESC2 );// Size of structure  sessionInfo.dwFlags = 0;// DPSESSION_xxx flags  sessionInfo.guidInstance = *lpguidInstance; // ID for the session instance  sessionInfo.guidApplication = *lpguidApplication;// GUID of the DirectPlay application.  sessionInfo.dwMaxPlayers = dwMaxPlayers;// Maximum # players allowed in session  sessionInfo.dwCurrentPlayers = 0;// Current # players in session (read only)  sessionInfo.lpszSessionNameA = lpszSessionName; // ANSI name of the session  sessionInfo.lpszPasswordA = NULL;// ANSI password of the session (optional)  sessionInfo.dwReserved1 = 0;// Reserved for future MS use.  sessionInfo.dwReserved2 = 0;  sessionInfo.dwUser1 = 0;// For use by the application  sessionInfo.dwUser2 = 0;  sessionInfo.dwUser3 = 0;  sessionInfo.dwUser4 = 0;  // fill out player name  ZeroMemory( &playerName, sizeof( DPNAME ) );  playerName.dwSize = sizeof( DPNAME ); // Size of structure  playerName.dwFlags = 0; // Not used. Must be zero.  playerName.lpszShortNameA = lpszPlayerName; // ANSI short or friendly name  playerName.lpszLongNameA = lpszPlayerName;// ANSI long or formal name  // fill out connection description  ZeroMemory( &connectInfo, sizeof( DPLCONNECTION ) );  connectInfo.dwSize = sizeof( DPLCONNECTION ); // Size of this structure  if ( bHostSession )  {    connectInfo.dwFlags = DPLCONNECTION_CREATESESSION; // Create a new session  }  else  {    connectInfo.dwFlags = DPLCONNECTION_JOINSESSION; // Join existing session  }  connectInfo.lpSessionDesc = &sessionInfo;// Pointer to session desc to use on connect  connectInfo.lpPlayerName = &playerName; // Pointer to Player name structure  connectInfo.guidSP = *lpguidServiceProvider;// GUID of the DPlay SP to use  connectInfo.lpAddress = lpAddress;// Address for service provider  connectInfo.dwAddressSize = dwAddressSize;// Size of address data  // launch and connect the game  hr = lpDPlayLobby->RunApplication( 0,&dwDPlayAppID, &connectInfo,hWaitEvent );  return hr;}This is a snippet of a old matchmaking app that started DirectPlay and non DirectPlay games. It may require some tweaking and esp. acquiring the correct devices to get going.The guid of the service provider has to be acquired from enumerating the connection types (filter out the tcp/ip one).Edit: Reformatted snippet due to fugly tabs inside. Tabs are devils sprout!   