home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / DPLOBBY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  21.7 KB  |  630 lines

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