Leaked source code of windows server 2003
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.

131 lines
5.0 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. {
  39. CBilink m_blLobbyObjectLinkage;
  40. DPNHANDLE hConnect;
  41. DWORD dwTargetProcessIdentity;
  42. DNHANDLE hTargetProcess;
  43. DNHANDLE hConnectEvent;
  44. LONG lRefCount;
  45. CMessageQueue *pSendQueue;
  46. CConnectionSettings *pConnectionSettings;
  47. #ifndef DPNBUILD_ONLYONETHREAD
  48. DNCRITICAL_SECTION csLock;
  49. #endif // !DPNBUILD_ONLYONETHREAD
  50. PVOID pvConnectContext;
  51. } DPL_CONNECTION, *PDPL_CONNECTION;
  52. //**********************************************************************
  53. // Variable definitions
  54. //**********************************************************************
  55. //**********************************************************************
  56. // Function prototypes
  57. //**********************************************************************
  58. HRESULT DPLConnectionNew(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  59. DPNHANDLE *const phConnect,
  60. DPL_CONNECTION **const ppdnConnection);
  61. HRESULT DPLConnectionSetConnectSettings( DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  62. DPNHANDLE const phConnect,
  63. CConnectionSettings * pdplConnectSettings );
  64. HRESULT DPLConnectionGetConnectSettings( DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  65. DPNHANDLE const phConnect,
  66. DPL_CONNECTION_SETTINGS * const pdplConnectSettings,
  67. DWORD * const pdwDataSize );
  68. HRESULT DPLConnectionRelease(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  69. const DPNHANDLE hConnect);
  70. HRESULT DPLConnectionFind(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  71. const DPNHANDLE hConnect,
  72. DPL_CONNECTION **const ppdnConnection,
  73. const BOOL bAddRef);
  74. HRESULT DPLConnectionConnect(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  75. const DPNHANDLE hConnect,
  76. const DWORD dwProcessId,
  77. const BOOL fApplication );
  78. HRESULT DPLConnectionDisconnect(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  79. const DPNHANDLE hConnect );
  80. HRESULT DPLConnectionEnum(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  81. DPNHANDLE *const prghConnect,
  82. DWORD *const pdwNum);
  83. HRESULT DPLConnectionSendREQ(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  84. const DPNHANDLE hConnect,
  85. const DWORD dwPID,
  86. DPL_CONNECT_INFO *const pInfo);
  87. HRESULT DPLConnectionReceiveREQ(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  88. BYTE *const pBuffer);
  89. HRESULT DPLConnectionSendACK(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  90. const DPNHANDLE hConnect);
  91. HRESULT DPLConnectionReceiveACK(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  92. const DPNHANDLE hSender,
  93. BYTE *const pBuffer);
  94. HRESULT DPLConnectionReceiveDisconnect(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  95. const DPNHANDLE hSender,
  96. BYTE *const pBuffer,
  97. const HRESULT hrDisconnectReason );
  98. HRESULT DPLConnectionSetContext(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  99. const DPNHANDLE hConnection,
  100. PVOID pvConnectContext );
  101. HRESULT DPLConnectionGetContext(DIRECTPLAYLOBBYOBJECT *const pdpLobbyObject,
  102. const DPNHANDLE hConnection,
  103. PVOID *ppvConnectContext );
  104. #endif // __DPLCONNECT_H__