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.

920 lines
32 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dplobby.h
  6. * Content: DirectPlayLobby include file
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * =========== ======= ==========
  11. * 4/13/96 myronth Created it
  12. * 6/20/96 myronth Cleaned it up
  13. * 6/24/96 myronth More cleanup
  14. * 7/1/96 myronth Changed DPLERR_ to DPERR_
  15. * 7/9/96 ajayj Cleaned up formatting to match dplay.h
  16. * 7/15/96 ajayj Added DPADDRESS chunk tags for dplaunch
  17. * sample app.
  18. * 7/16/96 kipo changed address types to be GUIDs instead of 4CC
  19. * 8/1/96 sohailm Added IDirectPlayLobby interface macros
  20. * 8/10/96 sohailm Bug#2227: declared pointers in callbacks as const.
  21. * 8/15/96 sohailm Added type definition for LPCDPLCONNECTION
  22. * Changed LPGUIDs to REFGUIDs in IDirectPlayLobby interface
  23. * Made function parameters constant where appropriate
  24. * 8/16/96 andyco took out some const and ref stuff for ship
  25. * 8/16/96 myronth Added SetConnectionSettings & Connect methods
  26. * 8/21/96 ajayj replace tabs with spaces
  27. * 8/21/96 kipo Added DPCOMPORTADDRESS structure
  28. * 9/5/96 myronth Wrapped DPLCAPS with MSINTERNAL
  29. * 10/23/96 myronth Added first cut of client/server methods
  30. * 10/25/96 myronth Added DX5 methods
  31. * 12/13/96 myronth Changed DPLAD_SYSTEM to DPLMSG_SYSTEM
  32. * 1/30/97 myronth Added MSINTERNAL's to DX5 stuff for meltdown
  33. * 2/12/97 myronth Removed meltdown changes
  34. * 2/12/97 myronth Mass DX5 changes
  35. * 2/18/97 myronth Implemented GetObjectCaps
  36. * 3/5/97 andyco added DPAID_TotalSize
  37. * 3/12/97 myronth Added DPAID_LobbyProvider chunk
  38. * 3/17/97 kipo Added data structures for CreateCompoundAddress() and
  39. * added guids for Unicode phone numbers and IP addresses
  40. * 3/24/97 kipo Added support for IDirectPlayLobby2 interface
  41. * 4/11/97 myronth Added CLSID_DirectPlayLobby clsid
  42. * 5/8/97 myronth Moved DPLCONNECTION structure definition to dplay.h
  43. * 5/21/97 ajayj Added structures and definitions for standard lobby
  44. * messages
  45. * 5/23/97 ajayj Added DPLDATA_PLAYERGUID structure
  46. * 5/30/97 ajayj Added DPLPROPERTY_MessagesSupported GUID
  47. * 6/7/97 myronth Fixed CreateCompoundAddress macros
  48. * 6/6/97 kipo Added "FAR" to all structures
  49. * 8/19/97 myronth Added DPLMSG_NEWSESSIONHOST structure
  50. * 11/13/97 myronth Added guidInstance to lobby system messages (#10944)
  51. * 12/2/97 myronth Added Register/UnregisterApplication
  52. * 12/4/97 myronth Added ConnectEx
  53. * 1/20/98 myronth Added WaitForConnectionSettings
  54. * 1/29/98 sohailm Added DPAID_INetPort.
  55. * 2/11/98 a-peterz Clarify that DPAID_INetPort value is a word (#18210)
  56. * 4/15/98 a-peterz Fix IDirectPlayLobby_CreateCompoundAddress C++ version
  57. * 10/22/99 aarono added support for application flags
  58. *@@END_MSINTERNAL
  59. ***************************************************************************/
  60. #ifndef __DPLOBBY_INCLUDED__
  61. #define __DPLOBBY_INCLUDED__
  62. #include "dplay.h"
  63. /* avoid warnings at Level 4 */
  64. #pragma warning(disable:4201)
  65. #ifdef __cplusplus
  66. extern "C" {
  67. #endif /* __cplusplus */
  68. /*
  69. * GUIDS used by DirectPlay objects
  70. */
  71. /* {AF465C71-9588-11cf-A020-00AA006157AC} */
  72. DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
  73. /* {26C66A70-B367-11cf-A024-00AA006157AC} */
  74. DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
  75. /* {0194C220-A303-11d0-9C4F-00A0C905425E} */
  76. DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  77. /* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */
  78. DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  79. /* {2DB72490-652C-11d1-A7A8-0000F803ABFC} */
  80. DEFINE_GUID(IID_IDirectPlayLobby3, 0x2db72490, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
  81. /* {2DB72491-652C-11d1-A7A8-0000F803ABFC} */
  82. DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
  83. /* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */
  84. DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
  85. /****************************************************************************
  86. *
  87. * IDirectPlayLobby Structures
  88. *
  89. * Various structures used to invoke DirectPlayLobby.
  90. *
  91. ****************************************************************************/
  92. typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBY;
  93. typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBYA;
  94. typedef struct IDirectPlayLobby IDirectPlayLobbyA;
  95. typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2;
  96. typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2A;
  97. typedef struct IDirectPlayLobby2 IDirectPlayLobby2A;
  98. typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3;
  99. typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3A;
  100. typedef struct IDirectPlayLobby3 IDirectPlayLobby3A;
  101. /*
  102. * DPLAPPINFO
  103. * Used to hold information about a registered DirectPlay
  104. * application
  105. */
  106. typedef struct DPLAPPINFO
  107. {
  108. DWORD dwSize; // Size of this structure
  109. GUID guidApplication; // GUID of the Application
  110. union
  111. {
  112. LPSTR lpszAppNameA; // Pointer to the Application Name
  113. LPWSTR lpszAppName;
  114. };
  115. } DPLAPPINFO, FAR *LPDPLAPPINFO;
  116. /*
  117. * LPCDPLAPPINFO
  118. * A constant pointer to DPLAPPINFO
  119. */
  120. typedef const DPLAPPINFO FAR *LPCDPLAPPINFO;
  121. /*
  122. * DPCOMPOUNDADDRESSELEMENT
  123. *
  124. * An array of these is passed to CreateCompoundAddresses()
  125. */
  126. typedef struct DPCOMPOUNDADDRESSELEMENT
  127. {
  128. GUID guidDataType;
  129. DWORD dwDataSize;
  130. LPVOID lpData;
  131. } DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT;
  132. /*
  133. * LPCDPCOMPOUNDADDRESSELEMENT
  134. * A constant pointer to DPCOMPOUNDADDRESSELEMENT
  135. */
  136. typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT;
  137. /*
  138. * LPDPAPPLICATIONDESC
  139. * Used to register a DirectPlay application
  140. */
  141. typedef struct DPAPPLICATIONDESC
  142. {
  143. DWORD dwSize;
  144. DWORD dwFlags;
  145. union
  146. {
  147. LPSTR lpszApplicationNameA;
  148. LPWSTR lpszApplicationName;
  149. };
  150. GUID guidApplication;
  151. union
  152. {
  153. LPSTR lpszFilenameA;
  154. LPWSTR lpszFilename;
  155. };
  156. union
  157. {
  158. LPSTR lpszCommandLineA;
  159. LPWSTR lpszCommandLine;
  160. };
  161. union
  162. {
  163. LPSTR lpszPathA;
  164. LPWSTR lpszPath;
  165. };
  166. union
  167. {
  168. LPSTR lpszCurrentDirectoryA;
  169. LPWSTR lpszCurrentDirectory;
  170. };
  171. LPSTR lpszDescriptionA;
  172. LPWSTR lpszDescriptionW;
  173. } DPAPPLICATIONDESC, *LPDPAPPLICATIONDESC;
  174. /*
  175. * LPDPAPPLICATIONDESC2
  176. * Used to register a DirectPlay application
  177. */
  178. typedef struct DPAPPLICATIONDESC2
  179. {
  180. DWORD dwSize;
  181. DWORD dwFlags;
  182. union
  183. {
  184. LPSTR lpszApplicationNameA;
  185. LPWSTR lpszApplicationName;
  186. };
  187. GUID guidApplication;
  188. union
  189. {
  190. LPSTR lpszFilenameA;
  191. LPWSTR lpszFilename;
  192. };
  193. union
  194. {
  195. LPSTR lpszCommandLineA;
  196. LPWSTR lpszCommandLine;
  197. };
  198. union
  199. {
  200. LPSTR lpszPathA;
  201. LPWSTR lpszPath;
  202. };
  203. union
  204. {
  205. LPSTR lpszCurrentDirectoryA;
  206. LPWSTR lpszCurrentDirectory;
  207. };
  208. LPSTR lpszDescriptionA;
  209. LPWSTR lpszDescriptionW;
  210. union
  211. {
  212. LPSTR lpszAppLauncherNameA;
  213. LPWSTR lpszAppLauncherName;
  214. };
  215. } DPAPPLICATIONDESC2, *LPDPAPPLICATIONDESC2;
  216. /****************************************************************************
  217. *
  218. * Enumeration Method Callback Prototypes
  219. *
  220. ****************************************************************************/
  221. /*
  222. * Callback for EnumAddress()
  223. */
  224. typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)(
  225. REFGUID guidDataType,
  226. DWORD dwDataSize,
  227. LPCVOID lpData,
  228. LPVOID lpContext);
  229. /*
  230. * Callback for EnumAddressTypes()
  231. */
  232. typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)(
  233. REFGUID guidDataType,
  234. LPVOID lpContext,
  235. DWORD dwFlags);
  236. /*
  237. * Callback for EnumLocalApplications()
  238. */
  239. typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
  240. LPCDPLAPPINFO lpAppInfo,
  241. LPVOID lpContext,
  242. DWORD dwFlags);
  243. /****************************************************************************
  244. *
  245. * DirectPlayLobby API Prototypes
  246. *
  247. ****************************************************************************/
  248. #ifdef UNICODE
  249. #define DirectPlayLobbyCreate DirectPlayLobbyCreateW
  250. #else
  251. #define DirectPlayLobbyCreate DirectPlayLobbyCreateA
  252. #endif /* UNICODE */
  253. extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
  254. extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
  255. /****************************************************************************
  256. *
  257. * IDirectPlayLobby (and IDirectPlayLobbyA) Interface
  258. *
  259. ****************************************************************************/
  260. #undef INTERFACE
  261. #define INTERFACE IDirectPlayLobby
  262. DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown )
  263. {
  264. /* IUnknown Methods */
  265. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  266. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  267. STDMETHOD_(ULONG,Release) (THIS) PURE;
  268. /* IDirectPlayLobby Methods */
  269. STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
  270. STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
  271. STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
  272. STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
  273. STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
  274. STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
  275. STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
  276. STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
  277. STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
  278. STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
  279. STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
  280. };
  281. /****************************************************************************
  282. *
  283. * IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
  284. *
  285. ****************************************************************************/
  286. #undef INTERFACE
  287. #define INTERFACE IDirectPlayLobby2
  288. DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby )
  289. {
  290. /* IUnknown Methods */
  291. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  292. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  293. STDMETHOD_(ULONG,Release) (THIS) PURE;
  294. /* IDirectPlayLobby Methods */
  295. STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
  296. STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
  297. STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
  298. STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
  299. STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
  300. STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
  301. STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
  302. STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
  303. STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
  304. STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
  305. STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
  306. /* IDirectPlayLobby2 Methods */
  307. STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
  308. };
  309. /****************************************************************************
  310. *
  311. * IDirectPlayLobby3 (and IDirectPlayLobby3A) Interface
  312. *
  313. ****************************************************************************/
  314. #undef INTERFACE
  315. #define INTERFACE IDirectPlayLobby3
  316. DECLARE_INTERFACE_( IDirectPlayLobby3, IDirectPlayLobby )
  317. {
  318. /* IUnknown Methods */
  319. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  320. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  321. STDMETHOD_(ULONG,Release) (THIS) PURE;
  322. /* IDirectPlayLobby Methods */
  323. STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
  324. STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
  325. STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
  326. STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
  327. STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
  328. STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
  329. STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
  330. STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
  331. STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
  332. STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
  333. STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
  334. /* IDirectPlayLobby2 Methods */
  335. STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
  336. /* IDirectPlayLobby3 Methods */
  337. STDMETHOD(ConnectEx) (THIS_ DWORD, REFIID, LPVOID *, IUnknown FAR *) PURE;
  338. STDMETHOD(RegisterApplication) (THIS_ DWORD, LPVOID) PURE;
  339. STDMETHOD(UnregisterApplication)(THIS_ DWORD, REFGUID) PURE;
  340. STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE;
  341. };
  342. /****************************************************************************
  343. *
  344. * IDirectPlayLobby interface macros
  345. *
  346. ****************************************************************************/
  347. #if !defined(__cplusplus) || defined(CINTERFACE)
  348. #define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  349. #define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p)
  350. #define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p)
  351. #define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
  352. #define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->lpVtbl->ConnectEx(p,a,b,c,d)
  353. #define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
  354. #define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
  355. #define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
  356. #define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
  357. #define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
  358. #define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
  359. #define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
  360. #define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->lpVtbl->RegisterApplication(p,a,b)
  361. #define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
  362. #define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
  363. #define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
  364. #define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
  365. #define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->lpVtbl->UnregisterApplication(p,a,b)
  366. #define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->lpVtbl->WaitForConnectionSettings(p,a)
  367. #else /* C++ */
  368. #define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  369. #define IDirectPlayLobby_AddRef(p) (p)->AddRef()
  370. #define IDirectPlayLobby_Release(p) (p)->Release()
  371. #define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c)
  372. #define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->ConnectEx(a,b,c,d)
  373. #define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f)
  374. #define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->CreateCompoundAddress(a,b,c,d)
  375. #define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d)
  376. #define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d)
  377. #define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c)
  378. #define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c)
  379. #define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e)
  380. #define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->RegisterApplication(a,b)
  381. #define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d)
  382. #define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d)
  383. #define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
  384. #define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c)
  385. #define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->UnregisterApplication(a,b)
  386. #define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->WaitForConnectionSettings(a)
  387. #endif
  388. /****************************************************************************
  389. *
  390. * DirectPlayLobby Flags
  391. *
  392. ****************************************************************************/
  393. /*
  394. * This flag is used by IDirectPlayLobby->WaitForConnectionSettings to
  395. * cancel a current wait that is in progress.
  396. */
  397. #define DPLWAIT_CANCEL 0x00000001
  398. /*
  399. * This is a message flag used by ReceiveLobbyMessage. It can be
  400. * returned in the dwMessageFlags parameter to indicate a message from
  401. * the system.
  402. */
  403. #define DPLMSG_SYSTEM 0x00000001
  404. /*
  405. * This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
  406. * It is used to indicate that the message is a standard lobby message.
  407. * DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY,
  408. * DPLMSG_GETPROPERTYRESPONSE
  409. */
  410. #define DPLMSG_STANDARD 0x00000002
  411. /*
  412. * Lobbyable Application registration flags
  413. */
  414. /*
  415. * Applications registered with this flag will not show up when
  416. * applications are enumerated in the lobby. This application
  417. * will only be able to be launched by a lobby client that already
  418. * knows about the application.
  419. */
  420. #define DPLAPP_NOENUM 0x80000000
  421. /*
  422. * Applications registered with this flag want voice to automatically
  423. * be enabled for their application. All players will be launched into
  424. * an 'n'-way voice conference when the application is started. The
  425. * user will be able to enable this flag for existing non-voice
  426. * directplay applications.
  427. */
  428. #define DPLAPP_AUTOVOICE 0x00000001
  429. /*
  430. * Applications that do their own voice conferencing should register with
  431. * this flag to avoid allowing the user to enable other voice chat
  432. * capabilites during the same session. This is to avoid users forcing
  433. * the DPLAPP_AUTOVOICE flag for the application.
  434. */
  435. #define DPLAPP_SELFVOICE 0x00000002
  436. /****************************************************************************
  437. *
  438. * DirectPlayLobby messages and message data structures
  439. *
  440. * All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
  441. * from a call to ReceiveLobbyMessage.
  442. *
  443. * All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
  444. * from a call to ReceiveLobbyMessage.
  445. *
  446. ****************************************************************************/
  447. /*
  448. * DPLMSG_GENERIC
  449. * Generic message structure used to identify the message type.
  450. */
  451. typedef struct _DPLMSG_GENERIC
  452. {
  453. DWORD dwType; // Message type
  454. } DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC;
  455. /*
  456. * DPLMSG_SYSTEMMESSAGE
  457. * Generic message format for all system messages --
  458. * DPLSYS_CONNECTIONSETTINGSREAD, DPLSYS_DPLYCONNECTSUCCEEDED,
  459. * DPLSYS_DPLAYCONNECTFAILED, DPLSYS_APPTERMINATED, DPLSYS_NEWCONNECTIONSETTINGS
  460. */
  461. typedef struct _DPLMSG_SYSTEMMESSAGE
  462. {
  463. DWORD dwType; // Message type
  464. GUID guidInstance; // Instance GUID of the dplay session the message corresponds to
  465. } DPLMSG_SYSTEMMESSAGE, FAR *LPDPLMSG_SYSTEMMESSAGE;
  466. /*
  467. * DPLMSG_SETPROPERTY
  468. * Standard message sent by an application to a lobby to set a
  469. * property
  470. */
  471. typedef struct _DPLMSG_SETPROPERTY
  472. {
  473. DWORD dwType; // Message type
  474. DWORD dwRequestID; // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
  475. GUID guidPlayer; // Player GUID
  476. GUID guidPropertyTag; // Property GUID
  477. DWORD dwDataSize; // Size of data
  478. DWORD dwPropertyData[1]; // Buffer containing data
  479. } DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY;
  480. #define DPL_NOCONFIRMATION 0
  481. /*
  482. * DPLMSG_SETPROPERTYRESPONSE
  483. * Standard message returned by a lobby to confirm a
  484. * DPLMSG_SETPROPERTY message.
  485. */
  486. typedef struct _DPLMSG_SETPROPERTYRESPONSE
  487. {
  488. DWORD dwType; // Message type
  489. DWORD dwRequestID; // Request ID
  490. GUID guidPlayer; // Player GUID
  491. GUID guidPropertyTag; // Property GUID
  492. HRESULT hr; // Return Code
  493. } DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE;
  494. /*
  495. * DPLMSG_GETPROPERTY
  496. * Standard message sent by an application to a lobby to request
  497. * the current value of a property
  498. */
  499. typedef struct _DPLMSG_GETPROPERTY
  500. {
  501. DWORD dwType; // Message type
  502. DWORD dwRequestID; // Request ID
  503. GUID guidPlayer; // Player GUID
  504. GUID guidPropertyTag; // Property GUID
  505. } DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY;
  506. /*
  507. * DPLMSG_GETPROPERTYRESPONSE
  508. * Standard message returned by a lobby in response to a
  509. * DPLMSG_GETPROPERTY message.
  510. */
  511. typedef struct _DPLMSG_GETPROPERTYRESPONSE
  512. {
  513. DWORD dwType; // Message type
  514. DWORD dwRequestID; // Request ID
  515. GUID guidPlayer; // Player GUID
  516. GUID guidPropertyTag; // Property GUID
  517. HRESULT hr; // Return Code
  518. DWORD dwDataSize; // Size of data
  519. DWORD dwPropertyData[1]; // Buffer containing data
  520. } DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE;
  521. /*
  522. * DPLMSG_NEWSESSIONHOST
  523. * Standard message returned by a lobby in response to a
  524. * the session host migrating to a new client
  525. */
  526. typedef struct _DPLMSG_NEWSESSIONHOST
  527. {
  528. DWORD dwType; // Message type
  529. GUID guidInstance; // GUID Instance of the session
  530. } DPLMSG_NEWSESSIONHOST, FAR *LPDPLMSG_NEWSESSIONHOST;
  531. /******************************************
  532. *
  533. * DirectPlay Lobby message dwType values
  534. *
  535. *****************************************/
  536. /*
  537. * The application has read the connection settings.
  538. * It is now O.K. for the lobby client to release
  539. * its IDirectPlayLobby interface.
  540. */
  541. #define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001
  542. /*
  543. * The application's call to DirectPlayConnect failed
  544. */
  545. #define DPLSYS_DPLAYCONNECTFAILED 0x00000002
  546. /*
  547. * The application has created a DirectPlay session.
  548. */
  549. #define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003
  550. /*
  551. * The application has terminated.
  552. */
  553. #define DPLSYS_APPTERMINATED 0x00000004
  554. /*
  555. * The message is a DPLMSG_SETPROPERTY message.
  556. */
  557. #define DPLSYS_SETPROPERTY 0x00000005
  558. /*
  559. * The message is a DPLMSG_SETPROPERTYRESPONSE message.
  560. */
  561. #define DPLSYS_SETPROPERTYRESPONSE 0x00000006
  562. /*
  563. * The message is a DPLMSG_GETPROPERTY message.
  564. */
  565. #define DPLSYS_GETPROPERTY 0x00000007
  566. /*
  567. * The message is a DPLMSG_GETPROPERTYRESPONSE message.
  568. */
  569. #define DPLSYS_GETPROPERTYRESPONSE 0x00000008
  570. /*
  571. * The message is a DPLMSG_NEWSESSIONHOST message.
  572. */
  573. #define DPLSYS_NEWSESSIONHOST 0x00000009
  574. /*
  575. * New connection settings are available.
  576. */
  577. #define DPLSYS_NEWCONNECTIONSETTINGS 0x0000000A
  578. /*
  579. * The Lobby Client has released the DirectPlayLobby Interface
  580. */
  581. #define DPLSYS_LOBBYCLIENTRELEASE 0x0000000B
  582. /****************************************************************************
  583. *
  584. * DirectPlay defined property GUIDs and associated data structures
  585. *
  586. ****************************************************************************/
  587. /*
  588. * DPLPROPERTY_MessagesSupported
  589. *
  590. * Request whether the lobby supports standard. Lobby with respond with either
  591. * TRUE or FALSE or may not respond at all.
  592. *
  593. * Property data is a single BOOL with TRUE or FALSE
  594. */
  595. // {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
  596. DEFINE_GUID(DPLPROPERTY_MessagesSupported,
  597. 0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
  598. /*
  599. * DPLPROPERTY_LobbyGuid
  600. *
  601. * Request the GUID that identifies the lobby software that the application
  602. * is communicating with.
  603. *
  604. * Property data is a single GUID.
  605. */
  606. // {F56920A0-D218-11d0-BA39-00C04FD7ED67}
  607. DEFINE_GUID(DPLPROPERTY_LobbyGuid,
  608. 0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
  609. /*
  610. * DPLPROPERTY_PlayerGuid
  611. *
  612. * Request the GUID that identifies the player on this machine for sending
  613. * property data back to the lobby.
  614. *
  615. * Property data is the DPLDATA_PLAYERDATA structure
  616. */
  617. // {B4319322-D20D-11d0-BA39-00C04FD7ED67}
  618. DEFINE_GUID(DPLPROPERTY_PlayerGuid,
  619. 0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
  620. /*
  621. * DPLDATA_PLAYERGUID
  622. *
  623. * Data structure to hold the GUID of the player and player creation flags
  624. * from the lobby.
  625. */
  626. typedef struct _DPLDATA_PLAYERGUID
  627. {
  628. GUID guidPlayer;
  629. DWORD dwPlayerFlags;
  630. } DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID;
  631. /*
  632. * DPLPROPERTY_PlayerScore
  633. *
  634. * Used to send an array of long integers to the lobby indicating the
  635. * score of a player.
  636. *
  637. * Property data is the DPLDATA_PLAYERSCORE structure.
  638. */
  639. // {48784000-D219-11d0-BA39-00C04FD7ED67}
  640. DEFINE_GUID(DPLPROPERTY_PlayerScore,
  641. 0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
  642. /*
  643. * DPLDATA_PLAYERSCORE
  644. *
  645. * Data structure to hold an array of long integers representing a player score.
  646. * Application must allocate enough memory to hold all the scores.
  647. */
  648. typedef struct _DPLDATA_PLAYERSCORE
  649. {
  650. DWORD dwScoreCount;
  651. LONG Score[1];
  652. } DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE;
  653. /****************************************************************************
  654. *
  655. * DirectPlay Address ID's
  656. *
  657. ****************************************************************************/
  658. /* DirectPlay Address
  659. *
  660. * A DirectPlay address consists of multiple chunks of data, each tagged
  661. * with a GUID signifying the type of data in the chunk. The chunk also
  662. * has a length so that unknown chunk types can be skipped.
  663. *
  664. * The EnumAddress() function is used to parse these address data chunks.
  665. */
  666. /*
  667. * DPADDRESS
  668. *
  669. * Header for block of address data elements
  670. */
  671. typedef struct _DPADDRESS
  672. {
  673. GUID guidDataType;
  674. DWORD dwDataSize;
  675. } DPADDRESS;
  676. typedef DPADDRESS FAR *LPDPADDRESS;
  677. /*
  678. * DPAID_TotalSize
  679. *
  680. * Chunk is a DWORD containing size of entire DPADDRESS structure
  681. */
  682. // {1318F560-912C-11d0-9DAA-00A0C90A43CB}
  683. DEFINE_GUID(DPAID_TotalSize,
  684. 0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
  685. /*
  686. * DPAID_ServiceProvider
  687. *
  688. * Chunk is a GUID describing the service provider that created the chunk.
  689. * All addresses must contain this chunk.
  690. */
  691. // {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
  692. DEFINE_GUID(DPAID_ServiceProvider,
  693. 0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  694. /*
  695. * DPAID_LobbyProvider
  696. *
  697. * Chunk is a GUID describing the lobby provider that created the chunk.
  698. * All addresses must contain this chunk.
  699. */
  700. // {59B95640-9667-11d0-A77D-0000F803ABFC}
  701. DEFINE_GUID(DPAID_LobbyProvider,
  702. 0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
  703. /*
  704. * DPAID_Phone and DPAID_PhoneW
  705. *
  706. * Chunk is a string containing a phone number (i.e. "1-800-555-1212")
  707. * in ANSI or UNICODE format
  708. */
  709. // {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
  710. DEFINE_GUID(DPAID_Phone,
  711. 0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  712. // {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
  713. DEFINE_GUID(DPAID_PhoneW,
  714. 0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  715. /*
  716. * DPAID_Modem and DPAID_ModemW
  717. *
  718. * Chunk is a string containing a modem name registered with TAPI
  719. * in ANSI or UNICODE format
  720. */
  721. // {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
  722. DEFINE_GUID(DPAID_Modem,
  723. 0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  724. // {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
  725. DEFINE_GUID(DPAID_ModemW,
  726. 0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  727. /*
  728. * DPAID_Inet and DPAID_InetW
  729. *
  730. * Chunk is a string containing a TCP/IP host name or an IP address
  731. * (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
  732. */
  733. // {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
  734. DEFINE_GUID(DPAID_INet,
  735. 0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  736. // {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
  737. DEFINE_GUID(DPAID_INetW,
  738. 0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  739. /*
  740. * DPAID_InetPort
  741. *
  742. * Chunk is the port number used for creating the apps TCP and UDP sockets.
  743. * WORD value (i.e. 47624).
  744. */
  745. // {E4524541-8EA5-11d1-8A96-006097B01411}
  746. DEFINE_GUID(DPAID_INetPort,
  747. 0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  748. #ifdef BIGMESSAGEDEFENSE
  749. //@@BEGIN_MSINTERNAL
  750. /*
  751. * DPAID_MaxMessageSize
  752. *
  753. * Tells DPLAY what the maximum allowed message size is. Enables SPs to
  754. * combat Denial of Service attacks
  755. */
  756. // this terrible hack is needed so the SP can work with the Elmer build.
  757. // it can be removed when the MSINTERNAL stuff is removed
  758. #define MAXMSGSIZEGUIDDEFINED
  759. // {F5D09980-F0C4-11d1-8326-006097B01411}
  760. DEFINE_GUID(DPAID_MaxMessageSize,
  761. 0xf5d09980, 0xf0c4, 0x11d1, 0x83, 0x26, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
  762. //@@END_MSINTERNAL
  763. #endif
  764. /*
  765. * DPCOMPORTADDRESS
  766. *
  767. * Used to specify com port settings. The constants that define baud rate,
  768. * stop bits and parity are defined in WINBASE.H. The constants for flow
  769. * control are given below.
  770. */
  771. #define DPCPA_NOFLOW 0 // no flow control
  772. #define DPCPA_XONXOFFFLOW 1 // software flow control
  773. #define DPCPA_RTSFLOW 2 // hardware flow control with RTS
  774. #define DPCPA_DTRFLOW 3 // hardware flow control with DTR
  775. #define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR
  776. typedef struct _DPCOMPORTADDRESS
  777. {
  778. DWORD dwComPort; // COM port to use (1-4)
  779. DWORD dwBaudRate; // baud rate (100-256k)
  780. DWORD dwStopBits; // no. stop bits (1-2)
  781. DWORD dwParity; // parity (none, odd, even, mark)
  782. DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr)
  783. } DPCOMPORTADDRESS;
  784. typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS;
  785. /*
  786. * DPAID_ComPort
  787. *
  788. * Chunk contains a DPCOMPORTADDRESS structure defining the serial port.
  789. */
  790. // {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
  791. DEFINE_GUID(DPAID_ComPort,
  792. 0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
  793. /****************************************************************************
  794. *
  795. * dplobby 1.0 obsolete definitions
  796. * Included for compatibility only.
  797. *
  798. ****************************************************************************/
  799. #define DPLAD_SYSTEM DPLMSG_SYSTEM
  800. #ifdef __cplusplus
  801. };
  802. #endif /* __cplusplus */
  803. #pragma warning(default:4201)
  804. #endif /* __DPLOBBY_INCLUDED__ */