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