ReactOS  0.4.13-dev-986-g029b8f2
dplayx_global.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "dplay.h"
Include dependency graph for dplayx_global.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL DPLAYX_ConstructData (void) DECLSPEC_HIDDEN
 
BOOL DPLAYX_DestructData (void) DECLSPEC_HIDDEN
 
HRESULT DPLAYX_GetConnectionSettingsA (DWORD dwAppID, LPVOID lpData, LPDWORD lpdwDataSize) DECLSPEC_HIDDEN
 
HRESULT DPLAYX_GetConnectionSettingsW (DWORD dwAppID, LPVOID lpData, LPDWORD lpdwDataSize) DECLSPEC_HIDDEN
 
HRESULT DPLAYX_SetConnectionSettingsA (DWORD dwFlags, DWORD dwAppID, const DPLCONNECTION *lpConn) DECLSPEC_HIDDEN
 
HRESULT DPLAYX_SetConnectionSettingsW (DWORD dwFlags, DWORD dwAppID, const DPLCONNECTION *lpConn) DECLSPEC_HIDDEN
 
BOOL DPLAYX_CreateLobbyApplication (DWORD dwAppID) DECLSPEC_HIDDEN
 
BOOL DPLAYX_WaitForConnectionSettings (BOOL bWait) DECLSPEC_HIDDEN
 
BOOL DPLAYX_AnyLobbiesWaitingForConnSettings (void) DECLSPEC_HIDDEN
 
BOOL DPLAYX_SetLobbyHandles (DWORD dwAppID, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead) DECLSPEC_HIDDEN
 
BOOL DPLAYX_SetLobbyMsgThreadId (DWORD dwAppId, DWORD dwThreadId) DECLSPEC_HIDDEN
 
LPCSTR DPLAYX_HresultToString (HRESULT hr) DECLSPEC_HIDDEN
 

Function Documentation

◆ DPLAYX_AnyLobbiesWaitingForConnSettings()

BOOL DPLAYX_AnyLobbiesWaitingForConnSettings ( void  )

Definition at line 1018 of file dplayx_global.c.

1019 {
1020  UINT i;
1021  BOOL bFound = FALSE;
1022 
1024 
1025  for( i=0; i < numSupportedLobbies; i++ )
1026  {
1027  if( ( lobbyData[ i ].dwAppID != 0 ) && /* lobby initialized */
1028  ( lobbyData[ i ].bWaitForConnectionSettings ) /* Waiting */
1029  )
1030  {
1031  bFound = TRUE;
1032  break;
1033  }
1034  }
1035 
1037 
1038  return bFound;
1039 }
#define TRUE
Definition: types.h:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
unsigned int UINT
Definition: ndis.h:50
static DPLAYX_LOBBYDATA * lobbyData

Referenced by IDirectPlayLobby3AImpl_RunApplication().

◆ DPLAYX_ConstructData()

BOOL DPLAYX_ConstructData ( void  )

Definition at line 358 of file dplayx_global.c.

359 {
360  SECURITY_ATTRIBUTES s_attrib;
361  BOOL bInitializeSharedMemory = FALSE;
362  LPVOID lpDesiredMemoryMapStart = (LPVOID)0x50000000;
363  HANDLE hInformOnStart;
364 
365  TRACE( "DPLAYX dll loaded - construct called\n" );
366 
367  /* Create a semaphore to block access to DPLAYX global data structs */
368 
369  s_attrib.bInheritHandle = TRUE;
370  s_attrib.lpSecurityDescriptor = NULL;
371  s_attrib.nLength = sizeof(s_attrib);
372 
373  hDplayxSema = CreateSemaphoreA( &s_attrib, 0, 1, lpszDplayxSemaName );
374 
375  /* First instance creates the semaphore. Others just use it */
376  if( GetLastError() == ERROR_SUCCESS )
377  {
378  TRACE( "Semaphore %p created\n", hDplayxSema );
379 
380  /* The semaphore creator will also build the shared memory */
381  bInitializeSharedMemory = TRUE;
382  }
383  else if ( GetLastError() == ERROR_ALREADY_EXISTS )
384  {
385  TRACE( "Found semaphore handle %p\n", hDplayxSema );
387  }
388  else
389  {
390  ERR( ": semaphore error %d\n", GetLastError() );
391  return FALSE;
392  }
393 
395 
397  &s_attrib,
399  0,
402 
403  if( GetLastError() == ERROR_SUCCESS )
404  {
405  TRACE( "File mapped %p created\n", hDplayxSharedMem );
406  }
407  else if ( GetLastError() == ERROR_ALREADY_EXISTS )
408  {
409  TRACE( "Found FileMapping handle %p\n", hDplayxSharedMem );
410  }
411  else
412  {
413  ERR( ": unable to create shared memory (%d)\n", GetLastError() );
415  return FALSE;
416  }
417 
420  0, 0, 0, lpDesiredMemoryMapStart );
421 
422  if( lpSharedStaticData == NULL )
423  {
424  ERR( ": unable to map static data into process memory space (%d)\n",
425  GetLastError() );
427  return FALSE;
428  }
429  else
430  {
431  if( lpDesiredMemoryMapStart == lpSharedStaticData )
432  {
433  TRACE( "File mapped to %p\n", lpSharedStaticData );
434  }
435  else
436  {
437  /* Presently the shared data structures use pointers. If the
438  * files are not mapped into the same area, the pointers will no
439  * longer make any sense :(
440  * FIXME: In the future make the shared data structures have some
441  * sort of fixup to make them independent between data spaces.
442  * This will also require a rework of the session data stuff.
443  */
444  ERR( "File mapped to %p (not %p). Expect failure\n",
445  lpSharedStaticData, lpDesiredMemoryMapStart );
446  }
447  }
448 
449  /* Dynamic area starts just after the static area */
451 
452  /* FIXME: Crude hack */
455 
456  /* Initialize shared data segments. */
457  if( bInitializeSharedMemory )
458  {
459  UINT i;
460 
461  TRACE( "Initializing shared memory\n" );
462 
463  /* Set all lobbies to be "empty" */
464  for( i=0; i < numSupportedLobbies; i++ )
465  {
467  }
468 
469  /* Set all sessions to be "empty" */
470  for( i=0; i < numSupportedSessions; i++ )
471  {
472  sessionData[i].dwSize = 0;
473  }
474 
475  /* Zero out the dynamic area */
477 
478  /* Just for fun sync the whole data area */
480  }
481 
483 
484  /* Everything was created correctly. Signal the lobby client that
485  * we started up correctly
486  */
487  if( DPLAYX_GetThisLobbyHandles( &hInformOnStart, NULL, NULL, FALSE ) &&
488  hInformOnStart
489  )
490  {
491  BOOL bSuccess;
492  bSuccess = SetEvent( hInformOnStart );
493  TRACE( "Signalling lobby app start event %p %s\n",
494  hInformOnStart, bSuccess ? "succeed" : "failed" );
495 
496  /* Close out handle */
497  DPLAYX_GetThisLobbyHandles( &hInformOnStart, NULL, NULL, TRUE );
498  }
499 
500  return TRUE;
501 }
LPVOID NTAPI MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress)
Definition: filemap.c:162
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
Definition: synch.c:430
static DPLAYX_MEM_SLICE * lpMemArea
Definition: dplayx_global.c:91
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1635
static BOOLEAN bSuccess
Definition: drive.cpp:417
DWORD dwSize
Definition: dplay.h:232
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define SEC_COMMIT
Definition: mmtypes.h:99
unsigned int BOOL
Definition: ntddk_ex.h:94
static DPSESSIONDESC2 * sessionData
smooth NULL
Definition: ftsmooth.c:416
#define dwDynamicSharedSize
Definition: dplayx_global.c:73
#define TRACE(s)
Definition: solgame.cpp:4
static LPVOID lpSharedStaticData
Definition: dplayx_global.c:60
#define FILE_MAP_WRITE
Definition: winbase.h:154
static HANDLE hDplayxSema
Definition: dplayx_global.c:55
#define dwTotalSharedSize
Definition: dplayx_global.c:74
#define SetLastError(x)
Definition: compat.h:409
static const char lpszDplayxSemaName[]
Definition: dplayx_global.c:54
#define LPVOID
Definition: nt_native.h:45
static HANDLE hDplayxSharedMem
Definition: dplayx_global.c:58
#define dwStaticSharedSize
Definition: dplayx_global.c:72
unsigned char BYTE
Definition: mem.h:68
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define ERR(fmt,...)
Definition: debug.h:109
static const char lpszDplayxFileMapping[]
Definition: dplayx_global.c:57
LPVOID lpSecurityDescriptor
Definition: compat.h:181
BOOL NTAPI FlushViewOfFile(IN LPCVOID lpBaseAddress, IN SIZE_T dwNumberOfBytesToFlush)
Definition: filemap.c:352
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
unsigned int UINT
Definition: ndis.h:50
static DPLAYX_LOBBYDATA * lobbyData
static void DPLAYX_InitializeLobbyDataEntry(LPDPLAYX_LOBBYDATA lpData)
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
static BOOL DPLAYX_GetThisLobbyHandles(LPHANDLE lphStart, LPHANDLE lphDeath, LPHANDLE lphConnRead, BOOL bClearSetHandles)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
#define PAGE_READWRITE
Definition: nt_native.h:1304

Referenced by DllMain().

◆ DPLAYX_CreateLobbyApplication()

BOOL DPLAYX_CreateLobbyApplication ( DWORD  dwAppID)

Definition at line 215 of file dplayx_global.c.

216 {
217  UINT i;
218 
219  /* 0 is the marker for unused application data slots */
220  if( dwAppID == 0 )
221  {
222  return FALSE;
223  }
224 
226 
227  /* Find an empty space in the list and insert the data */
228  for( i=0; i < numSupportedLobbies; i++ )
229  {
230  if( lobbyData[ i ].dwAppID == 0 )
231  {
232  /* This process is now lobbied */
233  TRACE( "Setting lobbyData[%u] for (0x%08x,0x%08x)\n",
234  i, dwAppID, GetCurrentProcessId() );
235 
236  lobbyData[ i ].dwAppID = dwAppID;
238 
239  /* FIXME: Where is the best place for this? In interface or here? */
243 
245  return TRUE;
246  }
247  }
248 
249  ERR( "No empty lobbies\n" );
250 
252  return FALSE;
253 }
#define TRUE
Definition: types.h:120
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define ERR(fmt,...)
Definition: debug.h:109
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
unsigned int UINT
Definition: ndis.h:50
static DPLAYX_LOBBYDATA * lobbyData
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158

Referenced by IDirectPlayLobby3AImpl_RunApplication(), IDirectPlayLobby3AImpl_SetConnectionSettings(), and IDirectPlayLobby3Impl_SetConnectionSettings().

◆ DPLAYX_DestructData()

BOOL DPLAYX_DestructData ( void  )

Definition at line 507 of file dplayx_global.c.

508 {
509  HANDLE hInformOnDeath;
510 
511  TRACE( "DPLAYX dll unloaded - destruct called\n" );
512 
513  /* If required, inform that this app is dying */
514  if( DPLAYX_GetThisLobbyHandles( NULL, &hInformOnDeath, NULL, FALSE ) &&
515  hInformOnDeath
516  )
517  {
518  BOOL bSuccess;
519  bSuccess = SetEvent( hInformOnDeath );
520  TRACE( "Signalling lobby app death event %p %s\n",
521  hInformOnDeath, bSuccess ? "succeed" : "failed" );
522 
523  /* Close out handle */
524  DPLAYX_GetThisLobbyHandles( NULL, &hInformOnDeath, NULL, TRUE );
525  }
526 
527  /* DO CLEAN UP (LAST) */
528 
529  /* Delete the semaphore */
531 
532  /* Delete shared memory file mapping */
535 
536  return FALSE;
537 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
static BOOLEAN bSuccess
Definition: drive.cpp:417
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static LPVOID lpSharedStaticData
Definition: dplayx_global.c:60
static HANDLE hDplayxSema
Definition: dplayx_global.c:55
static HANDLE hDplayxSharedMem
Definition: dplayx_global.c:58
#define UnmapViewOfFile
Definition: compat.h:403
static BOOL DPLAYX_GetThisLobbyHandles(LPHANDLE lphStart, LPHANDLE lphDeath, LPHANDLE lphConnRead, BOOL bClearSetHandles)

Referenced by DllMain().

◆ DPLAYX_GetConnectionSettingsA()

HRESULT DPLAYX_GetConnectionSettingsA ( DWORD  dwAppID,
LPVOID  lpData,
LPDWORD  lpdwDataSize 
)

Definition at line 776 of file dplayx_global.c.

779 {
780  LPDPLAYX_LOBBYDATA lpDplData;
781  DWORD dwRequiredDataSize = 0;
782  HANDLE hInformOnSettingRead;
783 
785 
786  if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
787  {
789 
790  TRACE( "Application 0x%08x is not lobbied\n", dwAppID );
791  return DPERR_NOTLOBBIED;
792  }
793 
794  dwRequiredDataSize = DPLAYX_SizeOfLobbyDataA( lpDplData->lpConn );
795 
796  /* Do they want to know the required buffer size or is the provided buffer
797  * big enough?
798  */
799  if ( ( lpData == NULL ) ||
800  ( *lpdwDataSize < dwRequiredDataSize )
801  )
802  {
804 
805  *lpdwDataSize = DPLAYX_SizeOfLobbyDataA( lpDplData->lpConn );
806 
807  return DPERR_BUFFERTOOSMALL;
808  }
809 
810  DPLAYX_CopyConnStructA( lpData, lpDplData->lpConn );
811 
813 
814  /* They have gotten the information - signal the event if required */
815  if( DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, FALSE ) &&
816  hInformOnSettingRead
817  )
818  {
819  BOOL bSuccess;
820  bSuccess = SetEvent( hInformOnSettingRead );
821  TRACE( "Signalling setting read event %p %s\n",
822  hInformOnSettingRead, bSuccess ? "succeed" : "failed" );
823 
824  /* Close out handle */
825  DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, TRUE );
826  }
827 
828  return DP_OK;
829 }
#define TRUE
Definition: types.h:120
#define DPERR_NOTLOBBIED
Definition: dplay.h:142
#define DPERR_BUFFERTOOSMALL
Definition: dplay.h:92
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
static BOOLEAN bSuccess
Definition: drive.cpp:417
LPDPLCONNECTION lpConn
static DWORD DPLAYX_SizeOfLobbyDataA(const DPLCONNECTION *lpConn)
#define DP_OK
Definition: dplay.h:88
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
static void DPLAYX_CopyConnStructA(LPDPLCONNECTION dest, const DPLCONNECTION *src)
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
static BOOL DPLAYX_GetThisLobbyHandles(LPHANDLE lphStart, LPHANDLE lphDeath, LPHANDLE lphConnRead, BOOL bClearSetHandles)

Referenced by IDirectPlayLobby3AImpl_GetConnectionSettings().

◆ DPLAYX_GetConnectionSettingsW()

HRESULT DPLAYX_GetConnectionSettingsW ( DWORD  dwAppID,
LPVOID  lpData,
LPDWORD  lpdwDataSize 
)

Definition at line 832 of file dplayx_global.c.

835 {
836  LPDPLAYX_LOBBYDATA lpDplData;
837  DWORD dwRequiredDataSize = 0;
838  HANDLE hInformOnSettingRead;
839 
841 
842  if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
843  {
845  return DPERR_NOTLOBBIED;
846  }
847 
848  dwRequiredDataSize = DPLAYX_SizeOfLobbyDataW( lpDplData->lpConn );
849 
850  /* Do they want to know the required buffer size or is the provided buffer
851  * big enough?
852  */
853  if ( ( lpData == NULL ) ||
854  ( *lpdwDataSize < dwRequiredDataSize )
855  )
856  {
858 
859  *lpdwDataSize = DPLAYX_SizeOfLobbyDataW( lpDplData->lpConn );
860 
861  return DPERR_BUFFERTOOSMALL;
862  }
863 
864  DPLAYX_CopyConnStructW( lpData, lpDplData->lpConn );
865 
867 
868  /* They have gotten the information - signal the event if required */
869  if( DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, FALSE ) &&
870  hInformOnSettingRead
871  )
872  {
873  BOOL bSuccess;
874  bSuccess = SetEvent( hInformOnSettingRead );
875  TRACE( "Signalling setting read event %p %s\n",
876  hInformOnSettingRead, bSuccess ? "succeed" : "failed" );
877 
878  /* Close out handle */
879  DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, TRUE );
880  }
881 
882  return DP_OK;
883 }
#define TRUE
Definition: types.h:120
#define DPERR_NOTLOBBIED
Definition: dplay.h:142
#define DPERR_BUFFERTOOSMALL
Definition: dplay.h:92
static void DPLAYX_CopyConnStructW(LPDPLCONNECTION dest, const DPLCONNECTION *src)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
static DWORD DPLAYX_SizeOfLobbyDataW(const DPLCONNECTION *lpConn)
static BOOLEAN bSuccess
Definition: drive.cpp:417
LPDPLCONNECTION lpConn
#define DP_OK
Definition: dplay.h:88
unsigned int BOOL
Definition: ntddk_ex.h:94
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
static BOOL DPLAYX_GetThisLobbyHandles(LPHANDLE lphStart, LPHANDLE lphDeath, LPHANDLE lphConnRead, BOOL bClearSetHandles)

Referenced by IDirectPlayLobby3Impl_GetConnectionSettings().

◆ DPLAYX_HresultToString()

LPCSTR DPLAYX_HresultToString ( HRESULT  hr)

Definition at line 1064 of file dplayx_global.c.

1065 {
1066  static char szTempStr[12];
1067 
1068  switch (hr)
1069  {
1070  case DP_OK:
1071  return "DP_OK";
1073  return "DPERR_ALREADYINITIALIZED";
1074  case DPERR_ACCESSDENIED:
1075  return "DPERR_ACCESSDENIED";
1076  case DPERR_ACTIVEPLAYERS:
1077  return "DPERR_ACTIVEPLAYERS";
1078  case DPERR_BUFFERTOOSMALL:
1079  return "DPERR_BUFFERTOOSMALL";
1080  case DPERR_CANTADDPLAYER:
1081  return "DPERR_CANTADDPLAYER";
1082  case DPERR_CANTCREATEGROUP:
1083  return "DPERR_CANTCREATEGROUP";
1085  return "DPERR_CANTCREATEPLAYER";
1087  return "DPERR_CANTCREATESESSION";
1089  return "DPERR_CAPSNOTAVAILABLEYET";
1090  case DPERR_EXCEPTION:
1091  return "DPERR_EXCEPTION";
1092  case DPERR_GENERIC:
1093  return "DPERR_GENERIC";
1094  case DPERR_INVALIDFLAGS:
1095  return "DPERR_INVALIDFLAGS";
1096  case DPERR_INVALIDOBJECT:
1097  return "DPERR_INVALIDOBJECT";
1098  case DPERR_INVALIDPARAMS:
1099  return "DPERR_INVALIDPARAMS";
1100  case DPERR_INVALIDPLAYER:
1101  return "DPERR_INVALIDPLAYER";
1102  case DPERR_INVALIDGROUP:
1103  return "DPERR_INVALIDGROUP";
1104  case DPERR_NOCAPS:
1105  return "DPERR_NOCAPS";
1106  case DPERR_NOCONNECTION:
1107  return "DPERR_NOCONNECTION";
1108  case DPERR_OUTOFMEMORY:
1109  return "DPERR_OUTOFMEMORY";
1110  case DPERR_NOMESSAGES:
1111  return "DPERR_NOMESSAGES";
1113  return "DPERR_NONAMESERVERFOUND";
1114  case DPERR_NOPLAYERS:
1115  return "DPERR_NOPLAYERS";
1116  case DPERR_NOSESSIONS:
1117  return "DPERR_NOSESSIONS";
1118  case DPERR_PENDING:
1119  return "DPERR_PENDING";
1120  case DPERR_SENDTOOBIG:
1121  return "DPERR_SENDTOOBIG";
1122  case DPERR_TIMEOUT:
1123  return "DPERR_TIMEOUT";
1124  case DPERR_UNAVAILABLE:
1125  return "DPERR_UNAVAILABLE";
1126  case DPERR_UNSUPPORTED:
1127  return "DPERR_UNSUPPORTED";
1128  case DPERR_BUSY:
1129  return "DPERR_BUSY";
1130  case DPERR_USERCANCEL:
1131  return "DPERR_USERCANCEL";
1132  case DPERR_NOINTERFACE:
1133  return "DPERR_NOINTERFACE";
1135  return "DPERR_CANNOTCREATESERVER";
1136  case DPERR_PLAYERLOST:
1137  return "DPERR_PLAYERLOST";
1138  case DPERR_SESSIONLOST:
1139  return "DPERR_SESSIONLOST";
1140  case DPERR_UNINITIALIZED:
1141  return "DPERR_UNINITIALIZED";
1142  case DPERR_NONEWPLAYERS:
1143  return "DPERR_NONEWPLAYERS";
1144  case DPERR_INVALIDPASSWORD:
1145  return "DPERR_INVALIDPASSWORD";
1146  case DPERR_CONNECTING:
1147  return "DPERR_CONNECTING";
1148  case DPERR_CONNECTIONLOST:
1149  return "DPERR_CONNECTIONLOST";
1150  case DPERR_UNKNOWNMESSAGE:
1151  return "DPERR_UNKNOWNMESSAGE";
1152  case DPERR_CANCELFAILED:
1153  return "DPERR_CANCELFAILED";
1154  case DPERR_INVALIDPRIORITY:
1155  return "DPERR_INVALIDPRIORITY";
1156  case DPERR_NOTHANDLED:
1157  return "DPERR_NOTHANDLED";
1158  case DPERR_CANCELLED:
1159  return "DPERR_CANCELLED";
1160  case DPERR_ABORTED:
1161  return "DPERR_ABORTED";
1162  case DPERR_BUFFERTOOLARGE:
1163  return "DPERR_BUFFERTOOLARGE";
1165  return "DPERR_CANTCREATEPROCESS";
1166  case DPERR_APPNOTSTARTED:
1167  return "DPERR_APPNOTSTARTED";
1169  return "DPERR_INVALIDINTERFACE";
1171  return "DPERR_NOSERVICEPROVIDER";
1173  return "DPERR_UNKNOWNAPPLICATION";
1174  case DPERR_NOTLOBBIED:
1175  return "DPERR_NOTLOBBIED";
1177  return "DPERR_SERVICEPROVIDERLOADED";
1179  return "DPERR_ALREADYREGISTERED";
1180  case DPERR_NOTREGISTERED:
1181  return "DPERR_NOTREGISTERED";
1183  return "DPERR_AUTHENTICATIONFAILED";
1184  case DPERR_CANTLOADSSPI:
1185  return "DPERR_CANTLOADSSPI";
1187  return "DPERR_ENCRYPTIONFAILED";
1188  case DPERR_SIGNFAILED:
1189  return "DPERR_SIGNFAILED";
1191  return "DPERR_CANTLOADSECURITYPACKAGE";
1193  return "DPERR_ENCRYPTIONNOTSUPPORTED";
1194  case DPERR_CANTLOADCAPI:
1195  return "DPERR_CANTLOADCAPI";
1196  case DPERR_NOTLOGGEDIN:
1197  return "DPERR_NOTLOGGEDIN";
1198  case DPERR_LOGONDENIED:
1199  return "DPERR_LOGONDENIED";
1200  default:
1201  /* For errors not in the list, return HRESULT as a string
1202  This part is not thread safe */
1203  WARN( "Unknown error 0x%08x\n", hr );
1204  wsprintfA( szTempStr, "0x%08x", hr );
1205  return szTempStr;
1206  }
1207 }
#define DPERR_NONEWPLAYERS
Definition: dplay.h:126
#define DPERR_UNINITIALIZED
Definition: dplay.h:125
#define DPERR_UNSUPPORTED
Definition: dplay.h:118
#define DPERR_CANTLOADCAPI
Definition: dplay.h:152
#define DPERR_INVALIDPLAYER
Definition: dplay.h:104
#define DPERR_USERCANCEL
Definition: dplay.h:120
#define DPERR_CANTCREATEPLAYER
Definition: dplay.h:95
HRESULT hr
Definition: shlfolder.c:183
#define DPERR_AUTHENTICATIONFAILED
Definition: dplay.h:146
#define DPERR_NOTLOBBIED
Definition: dplay.h:142
#define DPERR_BUFFERTOOSMALL
Definition: dplay.h:92
#define DPERR_CANTLOADSECURITYPACKAGE
Definition: dplay.h:150
#define DPERR_NOCONNECTION
Definition: dplay.h:107
#define DPERR_INVALIDGROUP
Definition: dplay.h:105
#define DPERR_INVALIDPARAMS
Definition: dplay.h:103
#define WARN(fmt,...)
Definition: debug.h:111
#define DPERR_SERVICEPROVIDERLOADED
Definition: dplay.h:143
#define DPERR_ACTIVEPLAYERS
Definition: dplay.h:91
#define DPERR_INVALIDPASSWORD
Definition: dplay.h:127
#define DPERR_OUTOFMEMORY
Definition: dplay.h:109
#define DPERR_CONNECTIONLOST
Definition: dplay.h:129
#define DPERR_CANTCREATEPROCESS
Definition: dplay.h:137
#define DPERR_INVALIDFLAGS
Definition: dplay.h:100
#define DPERR_NOMESSAGES
Definition: dplay.h:110
#define DPERR_NOCAPS
Definition: dplay.h:106
#define DPERR_INVALIDINTERFACE
Definition: dplay.h:139
#define DPERR_ENCRYPTIONNOTSUPPORTED
Definition: dplay.h:151
#define DPERR_SIGNFAILED
Definition: dplay.h:149
#define DPERR_PENDING
Definition: dplay.h:114
#define DP_OK
Definition: dplay.h:88
#define DPERR_NOPLAYERS
Definition: dplay.h:112
#define DPERR_NOTHANDLED
Definition: dplay.h:133
#define DPERR_BUSY
Definition: dplay.h:119
#define DPERR_EXCEPTION
Definition: dplay.h:98
#define DPERR_ALREADYREGISTERED
Definition: dplay.h:144
#define DPERR_LOGONDENIED
Definition: dplay.h:154
#define DPERR_TIMEOUT
Definition: dplay.h:116
#define DPERR_CANNOTCREATESERVER
Definition: dplay.h:122
#define DPERR_SENDTOOBIG
Definition: dplay.h:115
#define DPERR_SESSIONLOST
Definition: dplay.h:124
#define DPERR_INVALIDOBJECT
Definition: dplay.h:101
#define DPERR_NOINTERFACE
Definition: dplay.h:121
#define DPERR_APPNOTSTARTED
Definition: dplay.h:138
#define DPERR_NOSESSIONS
Definition: dplay.h:113
#define DPERR_CAPSNOTAVAILABLEYET
Definition: dplay.h:97
#define DPERR_BUFFERTOOLARGE
Definition: dplay.h:136
#define DPERR_INVALIDPRIORITY
Definition: dplay.h:132
#define DPERR_GENERIC
Definition: dplay.h:99
#define DPERR_UNKNOWNMESSAGE
Definition: dplay.h:130
#define DPERR_CONNECTING
Definition: dplay.h:128
#define DPERR_NONAMESERVERFOUND
Definition: dplay.h:111
#define DPERR_NOTREGISTERED
Definition: dplay.h:145
#define DPERR_NOTLOGGEDIN
Definition: dplay.h:153
#define DPERR_CANCELLED
Definition: dplay.h:134
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
#define DPERR_NOSERVICEPROVIDER
Definition: dplay.h:140
#define DPERR_CANCELFAILED
Definition: dplay.h:131
#define DPERR_ENCRYPTIONFAILED
Definition: dplay.h:148
#define DPERR_UNAVAILABLE
Definition: dplay.h:117
#define DPERR_PLAYERLOST
Definition: dplay.h:123
#define DPERR_UNKNOWNAPPLICATION
Definition: dplay.h:141
#define DPERR_CANTCREATESESSION
Definition: dplay.h:96
#define DPERR_CANTADDPLAYER
Definition: dplay.h:93
#define DPERR_CANTCREATEGROUP
Definition: dplay.h:94
#define DPERR_ACCESSDENIED
Definition: dplay.h:90
#define DPERR_ALREADYINITIALIZED
Definition: dplay.h:89
#define DPERR_CANTLOADSSPI
Definition: dplay.h:147
#define DPERR_ABORTED
Definition: dplay.h:135

Referenced by DirectPlayCreate(), DP_BuildSPCompoundAddr(), DP_EnumSessionsSendAsyncRequestThread(), DP_IF_CreatePlayer(), DP_InitializeDPLSP(), DP_InitializeDPSP(), DP_MSG_ErrorReceived(), DP_MSG_ExpectReply(), DP_SecureOpen(), DPL_ConnectEx(), IDirectPlay4AImpl_EnumConnections(), IDirectPlayLobby3AImpl_RunApplication(), IDirectPlaySPImpl_GetSPPlayerData(), and IDirectPlaySPImpl_HandleMessage().

◆ DPLAYX_SetConnectionSettingsA()

HRESULT DPLAYX_SetConnectionSettingsA ( DWORD  dwFlags,
DWORD  dwAppID,
const DPLCONNECTION lpConn 
)

Definition at line 890 of file dplayx_global.c.

893 {
894  LPDPLAYX_LOBBYDATA lpDplData;
895 
896  /* Parameter check */
897  if( dwFlags || !lpConn )
898  {
899  ERR("invalid parameters.\n");
900  return DPERR_INVALIDPARAMS;
901  }
902 
903  /* Store information */
904  if( lpConn->dwSize != sizeof(DPLCONNECTION) )
905  {
906  ERR(": old/new DPLCONNECTION type? Size=%08x\n", lpConn->dwSize );
907 
908  return DPERR_INVALIDPARAMS;
909  }
910 
912 
913  if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
914  {
916 
917  return DPERR_NOTLOBBIED;
918  }
919 
920  if( (!lpConn->lpSessionDesc ) ||
921  ( lpConn->lpSessionDesc->dwSize != sizeof( DPSESSIONDESC2 ) )
922  )
923  {
925 
926  ERR("DPSESSIONDESC passed in? Size=%u\n",
927  lpConn->lpSessionDesc?lpConn->lpSessionDesc->dwSize:0 );
928 
929  return DPERR_INVALIDPARAMS;
930  }
931 
932  /* Free the existing memory */
933  DPLAYX_PrivHeapFree( lpDplData->lpConn );
934 
936  DPLAYX_SizeOfLobbyDataA( lpConn ) );
937 
938  DPLAYX_CopyConnStructA( lpDplData->lpConn, lpConn );
939 
940 
942 
943  /* FIXME: Send a message - I think */
944 
945  return DP_OK;
946 }
static void DPLAYX_PrivHeapFree(LPVOID addr)
Definition: dplayx_global.c:93
#define DPERR_NOTLOBBIED
Definition: dplay.h:142
#define DPERR_INVALIDPARAMS
Definition: dplay.h:103
DWORD dwSize
Definition: dplay.h:284
LPDPLCONNECTION lpConn
static DWORD DPLAYX_SizeOfLobbyDataA(const DPLCONNECTION *lpConn)
DWORD dwSize
Definition: dplay.h:232
#define DP_OK
Definition: dplay.h:88
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
static LPVOID DPLAYX_PrivHeapAlloc(DWORD flags, DWORD size)
static void DPLAYX_CopyConnStructA(LPDPLCONNECTION dest, const DPLCONNECTION *src)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define ERR(fmt,...)
Definition: debug.h:109
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
LPDPSESSIONDESC2 lpSessionDesc
Definition: dplay.h:286

Referenced by IDirectPlayLobby3AImpl_SetConnectionSettings().

◆ DPLAYX_SetConnectionSettingsW()

HRESULT DPLAYX_SetConnectionSettingsW ( DWORD  dwFlags,
DWORD  dwAppID,
const DPLCONNECTION lpConn 
)

Definition at line 953 of file dplayx_global.c.

956 {
957  LPDPLAYX_LOBBYDATA lpDplData;
958 
959  /* Parameter check */
960  if( dwFlags || !lpConn )
961  {
962  ERR("invalid parameters.\n");
963  return DPERR_INVALIDPARAMS;
964  }
965 
966  /* Store information */
967  if( lpConn->dwSize != sizeof(DPLCONNECTION) )
968  {
969  ERR(": old/new DPLCONNECTION type? Size=%u\n", lpConn->dwSize );
970 
971  return DPERR_INVALIDPARAMS;
972  }
973 
975 
976  if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
977  {
979 
980  return DPERR_NOTLOBBIED;
981  }
982 
983  /* Free the existing memory */
984  DPLAYX_PrivHeapFree( lpDplData->lpConn );
985 
987  DPLAYX_SizeOfLobbyDataW( lpConn ) );
988 
989  DPLAYX_CopyConnStructW( lpDplData->lpConn, lpConn );
990 
991 
993 
994  /* FIXME: Send a message - I think */
995 
996  return DP_OK;
997 }
static void DPLAYX_PrivHeapFree(LPVOID addr)
Definition: dplayx_global.c:93
#define DPERR_NOTLOBBIED
Definition: dplay.h:142
#define DPERR_INVALIDPARAMS
Definition: dplay.h:103
static void DPLAYX_CopyConnStructW(LPDPLCONNECTION dest, const DPLCONNECTION *src)
DWORD dwSize
Definition: dplay.h:284
static DWORD DPLAYX_SizeOfLobbyDataW(const DPLCONNECTION *lpConn)
LPDPLCONNECTION lpConn
#define DP_OK
Definition: dplay.h:88
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
static LPVOID DPLAYX_PrivHeapAlloc(DWORD flags, DWORD size)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define ERR(fmt,...)
Definition: debug.h:109
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63
#define HEAP_ZERO_MEMORY
Definition: compat.h:123

Referenced by IDirectPlayLobby3Impl_SetConnectionSettings().

◆ DPLAYX_SetLobbyHandles()

BOOL DPLAYX_SetLobbyHandles ( DWORD  dwAppID,
HANDLE  hStart,
HANDLE  hDeath,
HANDLE  hConnRead 
)

Definition at line 255 of file dplayx_global.c.

257 {
258  LPDPLAYX_LOBBYDATA lpLData;
259 
260  /* Need to explicitly give lobby application. Can't set for yourself */
261  if( dwAppID == 0 )
262  {
263  return FALSE;
264  }
265 
267 
268  if( !DPLAYX_IsAppIdLobbied( dwAppID, &lpLData ) )
269  {
271  return FALSE;
272  }
273 
274  lpLData->hInformOnAppStart = hStart;
275  lpLData->hInformOnAppDeath = hDeath;
276  lpLData->hInformOnSettingRead = hConnRead;
277 
279 
280  return TRUE;
281 }
#define TRUE
Definition: types.h:120
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63

Referenced by DPL_CreateAndSetLobbyHandles().

◆ DPLAYX_SetLobbyMsgThreadId()

BOOL DPLAYX_SetLobbyMsgThreadId ( DWORD  dwAppId,
DWORD  dwThreadId 
)

Definition at line 1041 of file dplayx_global.c.

1042 {
1043  LPDPLAYX_LOBBYDATA lpLobbyData;
1044 
1046 
1047  if( !DPLAYX_IsAppIdLobbied( dwAppId, &lpLobbyData ) )
1048  {
1050  return FALSE;
1051  }
1052 
1053  lpLobbyData->dwLobbyMsgThreadId = dwThreadId;
1054 
1056 
1057  return TRUE;
1058 }
#define TRUE
Definition: types.h:120
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
DWORD dwThreadId
Definition: fdebug.c:31
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63

Referenced by IDirectPlayLobby3AImpl_RunApplication().

◆ DPLAYX_WaitForConnectionSettings()

BOOL DPLAYX_WaitForConnectionSettings ( BOOL  bWait)

Definition at line 999 of file dplayx_global.c.

1000 {
1001  LPDPLAYX_LOBBYDATA lpLobbyData;
1002 
1004 
1005  if( !DPLAYX_IsAppIdLobbied( 0, &lpLobbyData ) )
1006  {
1008  return FALSE;
1009  }
1010 
1011  lpLobbyData->bWaitForConnectionSettings = bWait;
1012 
1014 
1015  return TRUE;
1016 }
#define TRUE
Definition: types.h:120
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:67
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:63

Referenced by IDirectPlayLobby3AImpl_WaitForConnectionSettings(), and IDirectPlayLobby3Impl_WaitForConnectionSettings().