Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DirectPlay and EnumHosts()

Featured Replies

I'm trying to write a simple app to connect to Flight Simulator 2002,but EnumHosts() never finds the session I've created from within thegame.I've tried several of the sample apps in the DirectX 8 SDK, as well asa simple app created with the DirectX AppWizard for Visual C++. Here's the code from the AppWizard:

// GUID for FS2002:GUID g_guidApp = { 0x97C62470, 0x5F53, 0x4098, { 0xA8, 0xBB, 0x7F, 0x1F, 0x93, 0xB9, 0x4D, 0x93 } };[p][...][p]// Enumerate hostsDPN_APPLICATION_DESC dnAppDesc;ZeroMemory( &dnAppDesc, sizeof(DPN_APPLICATION_DESC) );dnAppDesc.dwSize = sizeof(DPN_APPLICATION_DESC);dnAppDesc.guidApplication = m_guidApp;[p]// Enumerate all the active DirectPlay games on the selected connectionhr = m_pDP->EnumHosts( &dnAppDesc,		// application description   m_pHostAddress,						// host address   m_pDeviceAddress,					  // device address   NULL,								  // pointer to user data   0,									 // user data size   INFINITE,							  // retry count (forever)   0,									 // retry interval   INFINITE,							  // time out (forever)   NULL,								  // user context   &m_hEnumAsyncOp,					   // async handle   DPNENUMHOSTS_OKTOQUERYFORADDRESSING	// flags   );

I never get a "DPN_MSGID_ENUM_HOSTS_RESPONSE" message back.I've also tried not setting the guid, and letting it search for anyavaiable guid, but that doesn't help. I've also tried sending NULLfor the host address, and letting it broadcast, but that doesn't helpeither.However, if I just compile the test app and run two copies of it, theycan find their own guid and connect to each other.Any ideas to help me get started here? Thanks for any clues...Russell

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.