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.

853 lines
29 KiB

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