Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
4.7 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: DPLConnect.h
  6. * Content: DirectPlay Lobby Connections Header File
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 02/21/00 mjn Created
  12. * 06/15/00 rmt Bug #33617 - Must provide method for providing automatic launch of DirectPlay instances
  13. * 07/08/2000 rmt Bug #38725 - Need to provide method to detect if app was lobby launched
  14. * rmt Bug #38757 - Callback messages for connections may return AFTER WaitForConnection returns
  15. * rmt Bug #38755 - No way to specify player name in Connection Settings
  16. * rmt Bug #38758 - DPLOBBY8.H has incorrect comments
  17. * rmt Bug #38783 - pvUserApplicationContext is only partially implemented
  18. * rmt Added DPLHANDLE_ALLCONNECTIONS and dwFlags (reserved field to couple of funcs).
  19. * 02/06/2001 rodtoll WINBUG #293871: DPLOBBY8: [IA64] Lobby launching a 64-bit
  20. * app from 64-bit lobby launcher crashes with unaligned memory error.
  21. *@@END_MSINTERNAL
  22. *
  23. ***************************************************************************/
  24. #ifndef __DPLCONNECT_H__
  25. #define __DPLCONNECT_H__
  26. //**********************************************************************
  27. // Constant definitions
  28. //**********************************************************************
  29. //**********************************************************************
  30. // Macro definitions
  31. //**********************************************************************
  32. //**********************************************************************
  33. // Structure definitions
  34. //**********************************************************************
  35. class CMessageQueue;
  36. class CConnectionSettings;
  37. typedef struct _DPL_CONNECTION {
  38. DPNHANDLE hConnect;
  39. DWORD dwTargetPID;
  40. HANDLE hConnectEvent;
  41. LONG lRefCount;
  42. CMessageQueue *pSendQueue;
  43. CConnectionSettings *pConnectionSettings;
  44. DNCRITICAL_SECTION csLock;
  45. PVOID pvConnectContext;
  46. } DPL_CONNECTION, *PDPL_CONNECTION;
  47. //**********************************************************************
  48. // Variable definitions
  49. //**********************************************************************
  50. //**********************************************************************
  51. // Function prototypes
  52. //**********************************************************************
  53. HRESULT DPLConnectionNew(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  54. DPNHANDLE *const phConnect,
  55. DPL_CONNECTION **const ppdnConnection);
  56. HRESULT DPLConnectionSetConnectSettings( DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  57. DPNHANDLE const phConnect,
  58. CConnectionSettings * pdplConnectSettings );
  59. HRESULT DPLConnectionGetConnectSettings( DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  60. DPNHANDLE const phConnect,
  61. DPL_CONNECTION_SETTINGS * const pdplConnectSettings,
  62. DWORD * const pdwDataSize );
  63. HRESULT DPLConnectionRelease(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  64. const DPNHANDLE hConnect);
  65. HRESULT DPLConnectionFind(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  66. const DPNHANDLE hConnect,
  67. DPL_CONNECTION **const ppdnConnection,
  68. const BOOL bAddRef);
  69. HRESULT DPLConnectionConnect(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  70. const DPNHANDLE hConnect,
  71. const DWORD dwProcessId,
  72. const BOOL fApplication );
  73. HRESULT DPLConnectionDisconnect(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  74. const DPNHANDLE hConnect );
  75. HRESULT DPLConnectionEnum(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  76. DPNHANDLE *const prghConnect,
  77. DWORD *const pdwNum);
  78. HRESULT DPLConnectionSendREQ(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  79. const DPNHANDLE hConnect,
  80. const DWORD dwPID,
  81. DPL_CONNECT_INFO *const pInfo);
  82. HRESULT DPLConnectionReceiveREQ(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  83. BYTE *const pBuffer);
  84. HRESULT DPLConnectionSendACK(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  85. const DPNHANDLE hConnect);
  86. HRESULT DPLConnectionReceiveACK(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  87. const DPNHANDLE hSender,
  88. BYTE *const pBuffer);
  89. HRESULT DPLConnectionReceiveDisconnect(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  90. const DPNHANDLE hSender,
  91. BYTE *const pBuffer,
  92. const HRESULT hrDisconnectReason );
  93. HRESULT DPLConnectionSetContext(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  94. const DPNHANDLE hConnection,
  95. PVOID pvConnectContext );
  96. HRESULT DPLConnectionGetContext(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  97. const DPNHANDLE hConnection,
  98. PVOID *ppvConnectContext );
  99. #endif // __DPLCONNECT_H__