Changeset 4315 for trunk/include


Ignore:
Timestamp:
Sep 25, 2000, 12:28:35 AM (25 years ago)
Author:
hugh
Message:

DplayX update

Location:
trunk/include/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/win/dplay.h

    r4133 r4315  
    11#ifndef __WINE_DPLAY_H
    22#define __WINE_DPLAY_H
     3
     4/* FIXME: GCC doesn't yet support annon structures so some of the structures defined here don't match the sdk exactly.
     5 * I've tried to come up with suitably terse names, but this file won't cut it for inclusion into a WineLib app.
     6 */
    37
    48#include "wine/obj_base.h"
     
    913
    1014#include "pshpack1.h"
     15
     16typedef LPVOID (*LPRGLPVOID)[];
     17typedef LPRGLPVOID PRGPVOID, LPRGPVOID, PRGLPVOID, PAPVOID, LPAPVOID, PALPVOID, LPALPVOID;
     18
     19#define VOL volatile
     20typedef VOID *VOL LPVOIDV;
     21
    1122
    1223/*****************************************************************************
     
    3041typedef struct IDirectPlay3 IDirectPlay3A,*LPDIRECTPLAY3A;
    3142
     43DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
     44typedef struct IDirectPlay4 IDirectPlay4,*LPDIRECTPLAY4;
     45
     46DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
     47typedef struct IDirectPlay4 IDirectPlay4A,*LPDIRECTPLAY4A;
     48
     49
    3250/*
    3351 * GUIDS used by Service Providers shipped with DirectPlay
     
    3856DEFINE_GUID(DPSPGUID_IPX, 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
    3957
    40 /* GUID for TCP/IP service provider 36E95EE0-8577-11cf-960C-0080C7534E82 */
     58/* GUID for TCP/IP service provider {36E95EE0-8577-11cf-960C-0080C7534E82} */
    4159DEFINE_GUID(DPSPGUID_TCPIP, 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
    4260
     
    97115#define DPERR_INVALIDPASSWORD           MAKE_DPHRESULT( 340 )
    98116#define DPERR_CONNECTING                MAKE_DPHRESULT( 350 )
     117#define DPERR_CONNECTIONLOST            MAKE_DPHRESULT( 360 )
     118#define DPERR_UNKNOWNMESSAGE            MAKE_DPHRESULT( 370 )
     119#define DPERR_CANCELFAILED              MAKE_DPHRESULT( 380 )
     120#define DPERR_INVALIDPRIORITY           MAKE_DPHRESULT( 390 )
     121#define DPERR_NOTHANDLED                MAKE_DPHRESULT( 400 )
     122#define DPERR_CANCELLED                 MAKE_DPHRESULT( 410 )
     123#define DPERR_ABORTED                   MAKE_DPHRESULT( 420 )
    99124#define DPERR_BUFFERTOOLARGE            MAKE_DPHRESULT( 1000 )
    100125#define DPERR_CANTCREATEPROCESS         MAKE_DPHRESULT( 1010 )
     
    107132#define DPERR_ALREADYREGISTERED         MAKE_DPHRESULT( 1090 )
    108133#define DPERR_NOTREGISTERED             MAKE_DPHRESULT( 1100 )
    109 #define DPERR_AUTHENTICATIONFAILED      MAKE_DPHRESULT(  2000 )
    110 #define DPERR_CANTLOADSSPI              MAKE_DPHRESULT(  2010 )
    111 #define DPERR_ENCRYPTIONFAILED          MAKE_DPHRESULT(  2020 )
    112 #define DPERR_SIGNFAILED                MAKE_DPHRESULT(  2030 )
    113 #define DPERR_CANTLOADSECURITYPACKAGE   MAKE_DPHRESULT(  2040 )
    114 #define DPERR_ENCRYPTIONNOTSUPPORTED    MAKE_DPHRESULT(  2050 )
    115 #define DPERR_CANTLOADCAPI              MAKE_DPHRESULT(  2060 )
    116 #define DPERR_NOTLOGGEDIN               MAKE_DPHRESULT(  2070 )
    117 #define DPERR_LOGONDENIED               MAKE_DPHRESULT(  2080 )
     134#define DPERR_AUTHENTICATIONFAILED      MAKE_DPHRESULT( 2000 )
     135#define DPERR_CANTLOADSSPI              MAKE_DPHRESULT( 2010 )
     136#define DPERR_ENCRYPTIONFAILED          MAKE_DPHRESULT( 2020 )
     137#define DPERR_SIGNFAILED                MAKE_DPHRESULT( 2030 )
     138#define DPERR_CANTLOADSECURITYPACKAGE   MAKE_DPHRESULT( 2040 )
     139#define DPERR_ENCRYPTIONNOTSUPPORTED    MAKE_DPHRESULT( 2050 )
     140#define DPERR_CANTLOADCAPI              MAKE_DPHRESULT( 2060 )
     141#define DPERR_NOTLOGGEDIN               MAKE_DPHRESULT( 2070 )
     142#define DPERR_LOGONDENIED               MAKE_DPHRESULT( 2080 )
    118143
    119144
     
    126151#define DPID_SERVERPLAYER       1           /* DPID of the server player */
    127152#define DPID_UNKNOWN            0xFFFFFFFF  /* Player ID is unknown */
    128 
    129 #define DPOPEN_OPENSESSION          0x00000001
    130 #define DPOPEN_CREATESESSION        0x00000002
    131 
    132 #define DPSEND_GUARANTEE            0x00000001
    133 #define DPSEND_HIGHPRIORITY         0x00000002
    134 #define DPSEND_TRYONCE              0x00000004
    135 
    136 #define DPRECEIVE_ALL               0x00000001
    137 #define DPRECEIVE_TOPLAYER          0x00000002
    138 #define DPRECEIVE_FROMPLAYER        0x00000004
    139 #define DPRECEIVE_PEEK              0x00000008
    140 
    141 #define DPCAPS_NAMESERVICE          0x00000001
    142 #define DPCAPS_NAMESERVER           0x00000002
    143 #define DPCAPS_GUARANTEED           0x00000004
    144 
    145 #define DPENUMSESSIONS_AVAILABLE    0x00000001
    146 #define DPENUMSESSIONS_ALL          0x00000002
    147 #define DPENUMSESSIONS_PREVIOUS     0x00000004
    148 
    149 #define DPENUMPLAYERS_ALL           0x00000000
    150 #define DPENUMPLAYERS_PREVIOUS      0x00000004
    151 #define DPENUMPLAYERS_LOCAL         0x00000008
    152 #define DPENUMPLAYERS_REMOTE        0x00000010
    153 #define DPENUMPLAYERS_GROUP         0x00000020
    154 #define DPENUMPLAYERS_SESSION       0x00000080
    155 
    156 #define DPESC_TIMEDOUT              0x00000001
    157153
    158154/*  DPCAPS -  Used to obtain the capabilities of a DirectPlay object */
     
    294290    }msgstr;
    295291} DPCHAT, *LPDPCHAT;
     292
     293typedef struct
     294{
     295  UINT   len;
     296  PUCHAR pData;
     297} SGBUFFER, *PSGBUFFER, *LPSGBUFFER;
     298
    296299
    297300typedef struct tagDPSECURITYDESC
     
    340343
    341344
    342 typedef BOOL (* CALLBACK  LPDPENUMDPCALLBACKW)(
     345typedef BOOL (* CALLBACK LPDPENUMDPCALLBACKW)(
    343346    LPGUID      lpguidSP,
    344347    LPWSTR      lpSPName,
     
    347350    LPVOID      lpContext);
    348351
    349 typedef BOOL (* CALLBACK  LPDPENUMDPCALLBACKA)(
     352typedef BOOL (* CALLBACK LPDPENUMDPCALLBACKA)(
    350353    LPGUID      lpguidSP,
    351354    LPSTR       lpSPName,       /* ptr to str w/ driver description */
     
    355358
    356359typedef const GUID   *LPCGUID;
     360
    357361typedef const DPNAME *LPCDPNAME;
    358362
    359 typedef BOOL (* CALLBACK  LPDPENUMCONNECTIONSCALLBACK)(
     363typedef BOOL (* CALLBACK LPDPENUMCONNECTIONSCALLBACK)(
    360364    LPCGUID     lpguidSP,
    361365    LPVOID      lpConnection,
     
    365369    LPVOID      lpContext);
    366370
    367 typedef BOOL (* CALLBACK  LPDPENUMSESSIONSCALLBACK)(
     371typedef BOOL (* CALLBACK LPDPENUMSESSIONSCALLBACK)(
    368372    LPDPSESSIONDESC lpDPSessionDesc,
    369373    LPVOID      lpContext,
     
    374378extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
    375379extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW, LPVOID );
    376 #define DirectPlayEnumerate WINELIB_NAME_AW(DirectPlayEnumerate)
    377 
    378380extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY2 *lplpDP, IUnknown *pUnk);
    379381
    380 typedef BOOL (* CALLBACK  LPDPENUMPLAYERSCALLBACK)(
     382typedef BOOL (* CALLBACK LPDPENUMPLAYERSCALLBACK)(
    381383    DPID   dpId,
    382384    LPSTR  lpFriendlyName,
     
    385387    LPVOID          lpContext );
    386388
    387 typedef BOOL (* CALLBACK  LPDPENUMPLAYERSCALLBACK2)(
     389typedef BOOL (* CALLBACK LPDPENUMPLAYERSCALLBACK2)(
    388390    DPID            dpId,
    389391    DWORD           dwPlayerType,
     
    392394    LPVOID          lpContext );
    393395
    394 typedef BOOL (* CALLBACK  LPDPENUMSESSIONSCALLBACK2)(
     396typedef BOOL (* CALLBACK LPDPENUMSESSIONSCALLBACK2)(
    395397    LPCDPSESSIONDESC2   lpThisSD,
    396398    LPDWORD             lpdwTimeOut,
    397399    DWORD               dwFlags,
    398400    LPVOID              lpContext );
     401
     402#define DPESC_TIMEDOUT          0x00000001
    399403
    400404#include "poppack.h"
     
    433437#undef ICOM_INTERFACE
    434438
    435 #ifdef ICOM_CINTERFACE
    436439    /*** IUnknown methods ***/
    437440#define IDirectPlay_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     
    461464#define IDirectPlay_Send(p,a,b,c,d,e)            ICOM_CALL5(Send,p,a,b,c,d,e)
    462465#define IDirectPlay_SetPlayerName(p,a,b,c)       ICOM_CALL3(SetPlayerName,p,a,b,c)
    463 #endif
    464466
    465467
    466468/*****************************************************************************
    467  * IDirectPlay2 interface
     469 * IDirectPlay2 and IDirectPlay2A interface
    468470 */
    469471#define ICOM_INTERFACE IDirectPlay2
     
    504506#undef ICOM_INTERFACE
    505507
    506 #ifdef ICOM_CINTERFACE
    507508/*** IUnknown methods ***/
    508509#define IDirectPlay2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     
    539540#define IDirectPlay2_SetPlayerName(p,a,b,c)        ICOM_CALL3(SetPlayerName,p,a,b,c)
    540541#define IDirectPlay2_SetSessionDesc(p,a,b)         ICOM_CALL2(SetSessionDesc,p,a,b)
    541 #endif
    542542
    543543
    544544/*****************************************************************************
    545  * IDirectPlay3 interface
     545 * IDirectPlay3 and IDirectPlay3A interface
    546546 */
    547547#define ICOM_INTERFACE IDirectPlay3
     
    568568#undef ICOM_INTERFACE
    569569
    570 #ifdef ICOM_CINTERFACE
    571570/*** IUnknown methods ***/
    572571#define IDirectPlay3_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     
    619618#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d)           ICOM_CALL4(GetPlayerAccount,p,a,b,c,d)
    620619#define IDirectPlay3_GetPlayerFlags(p,a,b)                 ICOM_CALL2(GetPlayerFlags,p,a,b)
    621 #endif
     620
     621/*****************************************************************************
     622 * IDirectPlay4 and IDirectPlay4A interface
     623 */
     624#define ICOM_INTERFACE IDirectPlay4
     625#define IDirectPlay4_METHODS \
     626    ICOM_METHOD2( HRESULT, GetGroupOwner,        DPID,arg1, LPDPID,arg2 ) \
     627    ICOM_METHOD2( HRESULT, SetGroupOwner,        DPID,arg1, DPID,arg2 ) \
     628    ICOM_METHOD9( HRESULT, SendEx,               DPID,arg1, DPID,arg2, DWORD,arg3, LPVOID,arg4, DWORD,arg5, DWORD,arg6, DWORD,arg7, LPVOID,arg8, LPDWORD,arg9 ) \
     629    ICOM_METHOD5( HRESULT, GetMessageQueue,      DPID,arg1, DPID,arg2, DWORD,arg3, LPDWORD,arg4, LPDWORD,arg5 ) \
     630    ICOM_METHOD2( HRESULT, CancelMessage,        DWORD,arg1, DWORD,arg2 ) \
     631    ICOM_METHOD3( HRESULT, CancelPriority,       DWORD,arg1, DWORD,arg2, DWORD,arg3 )
     632
     633#define IDirectPlay4_IMETHODS \
     634    IDirectPlay3_IMETHODS \
     635    IDirectPlay4_METHODS
     636ICOM_DEFINE(IDirectPlay4,IDirectPlay3)
     637#undef ICOM_INTERFACE
     638
     639/*** IUnknown methods ***/
     640#define IDirectPlayX_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
     641#define IDirectPlayX_AddRef(p)             ICOM_CALL (AddRef,p)
     642#define IDirectPlayX_Release(p)            ICOM_CALL (Release,p)
     643/*** IDirectPlay2 methods ***/
     644#define IDirectPlayX_AddPlayerToGroup(p,a,b)       ICOM_CALL2(AddPlayerToGroup,p,a,b)
     645#define IDirectPlayX_Close(p)                      ICOM_CALL (Close,p)
     646#define IDirectPlayX_CreateGroup(p,a,b,c,d,e)      ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
     647#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f)   ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
     648#define IDirectPlayX_DeletePlayerFromGroup(p,a,b)  ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
     649#define IDirectPlayX_DestroyGroup(p,a)             ICOM_CALL1(DestroyGroup,p,a)
     650#define IDirectPlayX_DestroyPlayer(p,a)            ICOM_CALL1(DestroyPlayer,p,a)
     651#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
     652#define IDirectPlayX_EnumGroups(p,a,b,c,d)         ICOM_CALL4(EnumGroups,p,a,b,c,d)
     653#define IDirectPlayX_EnumPlayers(p,a,b,c,d)        ICOM_CALL4(EnumPlayers,p,a,b,c,d)
     654#define IDirectPlayX_EnumSessions(p,a,b,c,d,e)     ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
     655#define IDirectPlayX_GetCaps(p,a,b)                ICOM_CALL2(GetCaps,p,a,b)
     656#define IDirectPlayX_GetGroupData(p,a,b,c,d)       ICOM_CALL4(GetGroupData,p,a,b,c,d)
     657#define IDirectPlayX_GetGroupName(p,a,b,c)         ICOM_CALL3(GetGroupName,p,a,b,c)
     658#define IDirectPlayX_GetMessageCount(p,a,b)        ICOM_CALL2(GetMessageCount,p,a,b)
     659#define IDirectPlayX_GetPlayerAddress(p,a,b,c)     ICOM_CALL3(GetPlayerAddress,p,a,b,c)
     660#define IDirectPlayX_GetPlayerCaps(p,a,b,c)        ICOM_CALL3(GetPlayerCaps,p,a,b,c)
     661#define IDirectPlayX_GetPlayerData(p,a,b,c,d)      ICOM_CALL4(GetPlayerData,p,a,b,c,d)
     662#define IDirectPlayX_GetPlayerName(p,a,b,c)        ICOM_CALL3(GetPlayerName,p,a,b,c)
     663#define IDirectPlayX_GetSessionDesc(p,a,b)         ICOM_CALL2(GetSessionDesc,p,a,b)
     664#define IDirectPlayX_Initialize(p,a)               ICOM_CALL1(Initialize,p,a)
     665#define IDirectPlayX_Open(p,a,b)                   ICOM_CALL2(Open,p,a,b)
     666#define IDirectPlayX_Receive(p,a,b,c,d,e)          ICOM_CALL5(Receive,p,a,b,c,d,e)
     667#define IDirectPlayX_Send(p,a,b,c,d,e)             ICOM_CALL5(Send,p,a,b,c,d,e)
     668#define IDirectPlayX_SetGroupData(p,a,b,c,d)       ICOM_CALL4(SetGroupData,p,a,b,c,d)
     669#define IDirectPlayX_SetGroupName(p,a,b,c)         ICOM_CALL3(SetGroupName,p,a,b,c)
     670#define IDirectPlayX_SetPlayerData(p,a,b,c,d)      ICOM_CALL4(SetPlayerData,p,a,b,c,d)
     671#define IDirectPlayX_SetPlayerName(p,a,b,c)        ICOM_CALL3(SetPlayerName,p,a,b,c)
     672#define IDirectPlayX_SetSessionDesc(p,a,b)         ICOM_CALL2(SetSessionDesc,p,a,b)
     673/*** IDirectPlay3 methods ***/
     674#define IDirectPlayX_AddGroupToGroup(p,a,b)                ICOM_CALL2(AddGroupToGroup,p,a,b)
     675#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f)     ICOM_CALL6(CreateGroupInGroup,p,a,b,c,d,e,f)
     676#define IDirectPlayX_DeleteGroupFromGroup(p,a,b)           ICOM_CALL2(DeleteGroupFromGroup,p,a,b)
     677#define IDirectPlayX_EnumConnections(p,a,b,c,d)            ICOM_CALL4(EnumConnections,p,a,b,c,d)
     678#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e)        ICOM_CALL5(EnumGroupsInGroup,p,a,b,c,d,e)
     679#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) ICOM_CALL4(GetGroupConnectionSettings,p,a,b,c,d)
     680#define IDirectPlayX_InitializeConnection(p,a,b)           ICOM_CALL2(InitializeConnection,p,a,b)
     681#define IDirectPlayX_SecureOpen(p,a,b,c,d)                 ICOM_CALL4(SecureOpen,p,a,b,c,d)
     682#define IDirectPlayX_SendChatMessage(p,a,b,c,d)            ICOM_CALL4(SendChatMessage,p,a,b,c,d)
     683#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c)   ICOM_CALL3(SetGroupConnectionSettings,p,a,b,c)
     684#define IDirectPlayX_StartSession(p,a,b)                   ICOM_CALL2(StartSession,p,a,b)
     685#define IDirectPlayX_GetGroupFlags(p,a,b)                  ICOM_CALL2(GetGroupFlags,p,a,b)
     686#define IDirectPlayX_GetGroupParent(p,a,b)                 ICOM_CALL2(GetGroupParent,p,a,b)
     687#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d)           ICOM_CALL4(GetPlayerAccount,p,a,b,c,d)
     688#define IDirectPlayX_GetPlayerFlags(p,a,b)                 ICOM_CALL2(GetPlayerFlags,p,a,b)
     689/*** IDirectPlay4 methods ***/
     690#define IDirectPlayX_GetGroupOwner(p,a,b)                  ICOM_CALL2(GetGroupOwner,p,a,b)
     691#define IDirectPlayX_SetGroupOwner(p,a,b)                  ICOM_CALL2(SetGroupOwner,p,a,b)
     692#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i)           ICOM_CALL9(SendEx,a,b,c,d,e,f,g,h,i)
     693#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e)          ICOM_CALL5(GetMessageQueue,a,b,c,d,e)
     694#define IDirectPlayX_CancelMessage(p,a,b)                  ICOM_CALL2(CancelMessage,a,b)
     695#define IDirectPlayX_CancelPriority(p,a,b,c)               ICOM_CALL3(CancelPriority,a,b,c)
     696
     697
     698/* For DirectPlay::EnumConnections */
     699#define DPCONNECTION_DIRECTPLAY      0x00000001
     700#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
     701
     702/* For DirectPlay::EnumPlayers and DirectPlay::EnumGroups */
     703#define DPENUMPLAYERS_ALL           0x00000000
     704#define DPENUMPLAYERS_LOCAL         0x00000008
     705#define DPENUMPLAYERS_REMOTE        0x00000010
     706#define DPENUMPLAYERS_GROUP         0x00000020
     707#define DPENUMPLAYERS_SESSION       0x00000080
     708#define DPENUMPLAYERS_SERVERPLAYER  0x00000100
     709#define DPENUMPLAYERS_SPECTATOR     0x00000200
     710#define DPENUMPLAYERS_OWNER         0x00002000
     711
     712#define DPENUMGROUPS_ALL            DPENUMPLAYERS_ALL
     713#define DPENUMGROUPS_LOCAL          DPENUMPLAYERS_LOCAL
     714#define DPENUMGROUPS_REMOTE         DPENUMPLAYERS_REMOTE
     715#define DPENUMGROUPS_SESSION        DPENUMPLAYERS_SESSION
     716#define DPENUMGROUPS_SHORTCUT       0x00000400
     717#define DPENUMGROUPS_STAGINGAREA    0x00000800
     718#define DPENUMGROUPS_HIDDEN         0x00001000
     719
     720
     721/* For DirectPlay::CreatePlayer */
     722#define DPPLAYER_SERVERPLAYER  DPENUMPLAYERS_SERVERPLAYER
     723#define DPPLAYER_SPECTATOR     DPENUMPLAYERS_SPECTATOR
     724#define DPPLAYER_LOCAL         DPENUMPLAYERS_LOCAL
     725#define DPPLAYER_OWNER         DPENUMPLAYERS_OWNER
     726
     727/* For DirectPlay::CreateGroup */
     728#define DPGROUP_STAGINGAREA  DPENUMGROUPS_STAGINGAREA
     729#define DPGROUP_LOCAL        DPENUMGROUPS_LOCAL
     730#define DPGROUP_HIDDEN       DPENUMGROUPS_HIDDEN
     731
     732/* For DirectPlay::EnumSessions */
     733#define DPENUMSESSIONS_AVAILABLE         0x00000001
     734#define DPENUMSESSIONS_ALL               0x00000002
     735#define DPENUMSESSIONS_ASYNC             0x00000010
     736#define DPENUMSESSIONS_STOPASYNC         0x00000020
     737#define DPENUMSESSIONS_PASSWORDREQUIRED  0x00000040
     738#define DPENUMSESSIONS_RETURNSTATUS      0x00000080
     739
     740/* For DirectPlay::GetCaps and DirectPlay::GetPlayerCaps */
     741#define DPGETCAPS_GUARANTEED  0x00000001
     742
     743/* For DirectPlay::GetGroupData and DirectPlay::GetPlayerData */
     744#define DPGET_REMOTE  0x00000000
     745#define DPGET_LOCAL   0x00000001
     746
     747/* For DirectPlay::Receive */
     748#define DPRECEIVE_ALL         0x00000001
     749#define DPRECEIVE_TOPLAYER    0x00000002
     750#define DPRECEIVE_FROMPLAYER  0x00000004
     751#define DPRECEIVE_PEEK        0x00000008
     752
     753/* For DirectPlay::Send */
     754#define DPSEND_NONGUARANTEED       0x00000000
     755#define DPSEND_GUARANTEED          0x00000001
     756#define DPSEND_HIGHPRIORITY        0x00000002
     757#define DPSEND_OPENSTREAM          0x00000008
     758#define DPSEND_CLOSESTREAM         0x00000010
     759#define DPSEND_SIGNED              0x00000020
     760#define DPSEND_ENCRYPTED           0x00000040
     761#define DPSEND_LOBBYSYSTEMMESSAGE  0x00000080
     762#define DPSEND_ASYNC               0x00000200
     763#define DPSEND_NOSENDCOMPLETEMSG   0x00000400
     764
     765#define DPSEND_MAX_PRI       0x0000FFFF
     766#define DPSEND_MAX_PRIORITY  DPSEND_MAX_PRI
     767
     768
     769/* For  DirectPlay::SetGroupData, DirectPlay::SetGroupName,
     770 * DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and
     771 * DirectPlay::SetSessionDesc.
     772 */
     773#define DPSET_REMOTE      0x00000000
     774#define DPSET_LOCAL       0x00000001
     775#define DPSET_GUARANTEED  0x00000002
     776
     777/* For DirectPlay::GetMessageQueue */
     778#define DPMESSAGEQUEUE_SEND    0x00000001
     779#define DPMESSAGEQUEUE_RECEIVE 0x00000002
     780
     781/* DirectPlay::Connect */
     782#define DPCONNECT_RETURNSTATUS  (DPENUMSESSIONS_RETURNSTATUS)
     783
     784
     785/** DirectPlay system messages **/
     786
     787/* A new player or group has been created in the session */
     788#define DPSYS_CREATEPLAYERORGROUP   0x0003
     789
     790/* A player or group has been deleted from the session */
     791#define DPSYS_DESTROYPLAYERORGROUP  0x0005
     792
     793/* A player has been added to a group */
     794#define DPSYS_ADDPLAYERTOGROUP      0x0007
     795
     796/* A player has been deleted from a group */
     797#define DPSYS_DELETEPLAYERFROMGROUP 0x0021
     798
     799/* Session lost for this object - ie lost contact with all players */
     800#define DPSYS_SESSIONLOST           0x0031
     801
     802/* The current host has left the session */
     803#define DPSYS_HOST                  0x0101
     804
     805/* Player or group data has changed */
     806#define DPSYS_SETPLAYERORGROUPDATA  0x0102
     807
     808/* The name of a player or group has changed */
     809#define DPSYS_SETPLAYERORGROUPNAME  0x0103
     810
     811/* The session description has changed */
     812#define DPSYS_SETSESSIONDESC        0x0104
     813
     814/* A group has been added to a group */
     815#define DPSYS_ADDGROUPTOGROUP           0x0105
     816
     817/* A group has been deleted from a group */
     818#define DPSYS_DELETEGROUPFROMGROUP      0x0106
     819
     820/* A secure player to player message has arrived */
     821#define DPSYS_SECUREMESSAGE         0x0107
     822
     823/* Start a new session */
     824#define DPSYS_STARTSESSION          0x0108
     825
     826/* A chat message has arrived */
     827#define DPSYS_CHAT                  0x0109
     828
     829/* The owner of a group has changed */
     830#define DPSYS_SETGROUPOWNER         0x010A
     831
     832/* An async send is done (finished normally, failed or cancelled) */
     833#define DPSYS_SENDCOMPLETE          0x010d
     834
     835/** DirectPlay System Messages **/
     836
     837#define DPPLAYERTYPE_GROUP   0x00000000
     838#define DPPLAYERTYPE_PLAYER  0x00000001
     839
     840
     841/* NOTE: DPMSG_HOST and DPMSG_GENERIC share the same format */
     842typedef struct tagDPMSG_GENERIC
     843{
     844   DWORD       dwType; /* Use message type as described above */
     845} DPMSG_GENERIC,     *LPDPMSG_GENERIC,
     846  DPMSG_HOST,        *LPDPMSG_HOST,
     847  DPMSG_SESSIONLOST, *LPDPMSG_SESSIONLOST;
     848
     849typedef struct tagDPMSG_CREATEPLAYERORGROUP
     850{
     851   DWORD   dwType;           /* Use message type as described above */
     852   DWORD   dwPlayerType;     /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
     853   DPID    dpId;             /* ID of the player/group */
     854   DWORD   dwCurrentPlayers; /* Current number of players/groups in session */
     855   LPVOID  lpData;           /* Pointer to data */
     856   DWORD   dwDataSize;       /* Size of data */
     857   DPNAME  dpnName;          /* Name info */
     858
     859   /* dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
     860    * does that mean about the message size before? -PH */
     861   DPID   dpIdParent;  /* id of parent group */
     862   DWORD  dwFlags;     /* Flags for the player/group */
     863} DPMSG_CREATEPLAYERORGROUP, *LPDPMSG_CREATEPLAYERORGROUP;
     864
     865typedef struct tagDPMSG_DESTROYPLAYERORGROUP
     866{
     867   DWORD   dwType;           /* Use message type as described above */
     868   DWORD   dwPlayerType;     /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
     869   DPID    dpId;             /* ID of player/group to be deleted */
     870   LPVOID  lpLocalData;      /* Pointer to local data */
     871   DWORD   dwLocalDataSize;  /* Sizeof local data */
     872   LPVOID  lpRemoteData;     /* Pointer to remote data */
     873   DWORD   dwRemoteDataSize; /* Sizeof remote data */
     874
     875   /* dpnName, dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
     876    * does that mean about the message size before? -PH */
     877   DPNAME  dpnName;     /* Name info */
     878   DPID    dpIdParent;  /* id of parent group */
     879   DWORD   dwFlags;     /* Flags for the player/group */
     880} DPMSG_DESTROYPLAYERORGROUP, *LPDPMSG_DESTROYPLAYERORGROUP;
     881
     882/* NOTE: DPMSG_ADDPLAYERTOGROUP and DPMSG_DELETEPLAYERFROMGROUP are the same */
     883typedef struct tagDPMSG_ADDPLAYERTOGROUP
     884{
     885   DWORD  dwType;      /* Use message type as described above */
     886   DPID   dpIdGroup;   /* Group ID to add player into */
     887   DPID   dpIdPlayer;  /* ID of player to add */
     888} DPMSG_ADDPLAYERTOGROUP,      *LPDPMSG_ADDPLAYERTOGROUP,
     889  DPMSG_DELETEPLAYERFROMGROUP, *LPDPMSG_DELETEPLAYERFROMGROUP;
     890
     891/* NOTE: DPMSG_ADDGROUPTOGROUP and DPMSG_DELETEGROUPFROMGROUP are the same */
     892typedef struct tagDPMSG_ADDGROUPTOGROUP
     893{
     894   DWORD  dwType;          /* Use message type as described above */
     895   DPID   dpIdParentGroup; /* Group ID to add group into */
     896   DPID   dpIdGroup;       /* ID of group to add */
     897} DPMSG_ADDGROUPTOGROUP,      *LPDPMSG_ADDGROUPTOGROUP,
     898  DPMSG_DELETEGROUPFROMGROUP, *LPDPMSG_DELETEGROUPFROMGROUP;
     899
     900typedef struct tagDPMSG_SETPLAYERORGROUPDATA
     901{
     902   DWORD   dwType;       /* Use message type as described above */
     903   DWORD   dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
     904   DPID    dpId;         /* ID of player/group */
     905   LPVOID  lpData;       /* Pointer to data */
     906   DWORD   dwDataSize;   /* Size of data */
     907} DPMSG_SETPLAYERORGROUPDATA, *LPDPMSG_SETPLAYERORGROUPDATA;
     908
     909typedef struct tagDPMSG_SETPLAYERORGROUPNAME
     910{
     911   DWORD  dwType;       /* Use message type as described above */
     912   DWORD  dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
     913   DPID   dpId;         /* ID of player/group */
     914   DPNAME dpnName;      /* New name */
     915} DPMSG_SETPLAYERORGROUPNAME, *LPDPMSG_SETPLAYERORGROUPNAME;
     916
     917typedef struct tagDPMSG_SETSESSIONDESC
     918{
     919   DWORD           dwType; /* Use message type as described above */
     920   DPSESSIONDESC2  dpDesc; /* New session desc */
     921} DPMSG_SETSESSIONDESC, *LPDPMSG_SETSESSIONDESC;
     922
     923typedef struct tagDPMSG_SECUREMESSAGE
     924{
     925   DWORD   dwType;     /* Use message type as described above */
     926   DWORD   dwFlags;    /* Signed/Encrypted */
     927   DPID    dpIdFrom;   /* ID of from player */
     928   LPVOID  lpData;     /* Message sent */
     929   DWORD   dwDataSize; /* Size of message */
     930} DPMSG_SECUREMESSAGE, *LPDPMSG_SECUREMESSAGE;
     931
     932typedef struct tagDPMSG_STARTSESSION
     933{
     934   DWORD            dwType; /* Use message type as described above */
     935   LPDPLCONNECTION  lpConn; /* DPLCONNECTION structure */
     936} DPMSG_STARTSESSION, *LPDPMSG_STARTSESSION;
     937
     938typedef struct tagDPMSG_CHAT
     939{
     940   DWORD     dwType;       /* Use message type as described above */
     941   DWORD     dwFlags;      /* Message flags */
     942   DPID      idFromPlayer; /* ID of sender */
     943   DPID      idToPlayer;   /* ID of who msg is for */
     944   DPID      idToGroup;    /* ID of what group msg is for */
     945   LPDPCHAT  lpChat;       /* Chat message */
     946} DPMSG_CHAT, *LPDPMSG_CHAT;
     947
     948typedef struct tagDPMSG_SETGROUPOWNER
     949{
     950   DWORD  dwType;     /* Use message type as described above */
     951   DPID   idGroup;    /* Group ID */
     952   DPID   idNewOwner; /* ID of player who now owns group */
     953   DPID   idOldOwner; /* ID of player who used to own group */
     954} DPMSG_SETGROUPOWNER, *LPDPMSG_SETGROUPOWNER;
     955
     956typedef struct
     957{
     958   DWORD    dwType;      /* Use message type as described above */
     959   DPID     idFrom;      /* ID from */
     960   DPID     idTo;        /* ID to */
     961   DWORD    dwFlags;
     962   DWORD    dwPriority;
     963   DWORD    dwTimeout;
     964   LPVOID   lpvContext;
     965   DWORD    dwMsgID;
     966   HRESULT  hr;
     967   DWORD    dwSendTime;  /* When sent ? */
     968} DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE;
     969
     970
    622971
    623972#ifdef __cplusplus
  • trunk/include/win/dplobby.h

    r945 r4315  
    11#ifndef __WINE_DPLOBBY_H
    22#define __WINE_DPLOBBY_H
     3
     4/* FIXME: GCC doesn't yet support annon structures so some of the structures defined here don't match the sdk exactly.
     5 * I've tried to come up with suitably terse names, but this file won't cut it for inclusion into a WineLib app.
     6 */
    37
    48#include "dplay.h"
     
    2731typedef struct IDirectPlayLobby2 IDirectPlayLobby2A, *LPDIRECTPLAYLOBBY2A;
    2832
    29 
    30 /*****************************************************************************
     33DEFINE_GUID(IID_IDirectPlayLobby3, 0x2db72490, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
     34typedef struct IDirectPlayLobby3 IDirectPlayLobby3, *LPDIRECTPLAYLOBBY3;
     35
     36DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
     37typedef struct IDirectPlayLobby3 IDirectPlayLobby3A, *LPDIRECTPLAYLOBBY3A;
     38
     39
     40/*****************************************************************************
     41 * DirectPlayLobby Property GUIDs used in lobby messages
     42 */
     43
     44/* DPLPROPERTY_MessagesSupported {762CCDA1-D916-11d0-BA39-00C04FD7ED67}.
     45 * Purpose: Request if the lobby supports standard (?).
     46 * Response: Answer is a BOOL. TRUE if supports the standard (?) and FALSE otherwise. Of course, it might not respond at all.
     47 */
     48DEFINE_GUID(DPLPROPERTY_MessagesSupported, 0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
     49
     50/* DPLPROPERTY_LobbyGuid {F56920A0-D218-11d0-BA39-00C04FD7ED67}.
     51 * Purpose: Request the GUID that identifies the lobby version that the application is communicating with.
     52 * Response: The GUID which identifies the lobby version
     53 */
     54DEFINE_GUID(DPLPROPERTY_LobbyGuid, 0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
     55
     56/* DPLPROPERTY_PlayerGuid {B4319322-D20D-11d0-BA39-00C04FD7ED67}
     57 * Purpose: Request the GUID that identifies the player for this particular machine.
     58 * Response: DPLDATA_PLAYERDATA structure.
     59 */
     60DEFINE_GUID(DPLPROPERTY_PlayerGuid, 0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
     61
     62/* DPLPROPERTY_PlayerScore {48784000-D219-11d0-BA39-00C04FD7ED67}
     63 * Purpose: Used to send a score of a player to the lobby. The format is an array of long integers.
     64 * Response: I don't think there is one.
     65 */
     66DEFINE_GUID(DPLPROPERTY_PlayerScore, 0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
     67
     68
     69
     70/*****************************************************************************
     71 * LOBBY structures associated with GUID messages
     72 */
     73
     74typedef struct tagDPLDATA_PLAYERGUID
     75{
     76        GUID    guidPlayer;
     77        DWORD   dwPlayerFlags;
     78} DPLDATA_PLAYERGUID, *LPDPLDATA_PLAYERGUID;
     79
     80typedef struct tagDPLDATA_PLAYERSCORE
     81{
     82        DWORD   dwScoreCount;
     83        LONG    Score[1];
     84} DPLDATA_PLAYERSCORE, *LPDPLDATA_PLAYERSCORE;
     85
     86
     87/*****************************************************************************
     88 * LOBBY messages and message data structures.
     89 *
     90 * System messages can be identified by dwMessageFlags having a value of DPLMSG_SYSTEM
     91 * after a call to ReceiveLobbyMessage.
     92 *
     93 * Standard messages can be indentified by dwMessageFlags having a value of DPLMSG_STANDARD
     94 * after a call to ReceiveLobbyMessage.
     95 */
     96
     97/* DPLobby1 definition required for backwards compatibility */
     98#define DPLMSG_SYSTEM                                   0x00000001
     99#define DPLMSG_STANDARD                                 0x00000002
     100#define DPLAD_SYSTEM          DPLMSG_SYSTEM
     101
     102
     103/* System messages  - dwType field for messages */
     104#define DPLSYS_CONNECTIONSETTINGSREAD   0x00000001
     105#define DPLSYS_DPLAYCONNECTFAILED       0x00000002
     106#define DPLSYS_DPLAYCONNECTSUCCEEDED    0x00000003
     107#define DPLSYS_APPTERMINATED            0x00000004
     108#define DPLSYS_SETPROPERTY              0x00000005
     109#define DPLSYS_SETPROPERTYRESPONSE      0x00000006
     110#define DPLSYS_GETPROPERTY              0x00000007
     111#define DPLSYS_GETPROPERTYRESPONSE      0x00000008
     112#define DPLSYS_NEWSESSIONHOST           0x00000009
     113#define DPLSYS_NEWCONNECTIONSETTINGS    0x0000000A
     114
     115
     116
     117/* Used to indentify the message type */
     118typedef struct tagDPLMSG_GENERIC
     119{
     120    DWORD       dwType;         /* Message type */
     121} DPLMSG_GENERIC, *LPDPLMSG_GENERIC;
     122
     123/* Generic format for system messages - see above */
     124typedef struct tagDPLMSG_SYSTEMMESSAGE
     125{
     126    DWORD       dwType;         /* Message type */
     127    GUID        guidInstance;   /* Instance GUID of the dplay session the message corresponds to */
     128} DPLMSG_SYSTEMMESSAGE, *LPDPLMSG_SYSTEMMESSAGE;
     129
     130/* Generic message to set a property - see property GUIDs above */
     131typedef struct tagDPLMSG_SETPROPERTY
     132{
     133        DWORD   dwType;              /* Message type */
     134        DWORD   dwRequestID;         /* Request ID (DPL_NOCONFIRMATION if no confirmation desired) */
     135        GUID    guidPlayer;          /* Player GUID */
     136        GUID    guidPropertyTag;     /* Property GUID */
     137        DWORD   dwDataSize;          /* Size of data */
     138        DWORD   dwPropertyData[1];   /* Buffer containing data */
     139} DPLMSG_SETPROPERTY, *LPDPLMSG_SETPROPERTY;
     140
     141#define DPL_NOCONFIRMATION                      0L
     142
     143/* Reply to DPLMSG_SETPROPERTY */
     144typedef struct tagDPLMSG_SETPROPERTYRESPONSE
     145{
     146        DWORD   dwType;              /* Message type */
     147        DWORD   dwRequestID;         /* Request ID */
     148        GUID    guidPlayer;          /* Player GUID */
     149        GUID    guidPropertyTag;     /* Property GUID */
     150        HRESULT hr;                  /* Return Code */
     151} DPLMSG_SETPROPERTYRESPONSE, *LPDPLMSG_SETPROPERTYRESPONSE;
     152
     153/* Request to get the present value of a property */
     154typedef struct tagDPLMSG_GETPROPERTY
     155{
     156        DWORD   dwType;           /* Message type */
     157        DWORD   dwRequestID;      /* Request ID */
     158        GUID    guidPlayer;       /* Player GUID */
     159        GUID    guidPropertyTag;  /* Property GUID */
     160} DPLMSG_GETPROPERTY, *LPDPLMSG_GETPROPERTY;
     161
     162/* Response to a request to get the present value of a property */
     163typedef struct tagDPLMSG_GETPROPERTYRESPONSE
     164{
     165        DWORD   dwType;              /* Message type */
     166        DWORD   dwRequestID;         /* Request ID */
     167        GUID    guidPlayer;          /* Player GUID */
     168        GUID    guidPropertyTag;     /* Property GUID */
     169        HRESULT hr;                  /* Return Code */
     170        DWORD   dwDataSize;          /* Size of data */
     171        DWORD   dwPropertyData[1];   /* Buffer containing data */
     172} DPLMSG_GETPROPERTYRESPONSE, *LPDPLMSG_GETPROPERTYRESPONSE;
     173
     174/* Standard message in response to a session host migration to a new client */
     175typedef struct tagDPLMSG_NEWSESSIONHOST
     176{
     177    DWORD   dwType;        /* Message type */
     178    GUID    guidInstance;  /* GUID Instance of the session */
     179} DPLMSG_NEWSESSIONHOST, *LPDPLMSG_NEWSESSIONHOST;
     180
     181/*****************************************************************************
     182 * DirectPlay Address ID's
     183 * A DirectPlay address is composed of multiple data chunks, each assocated with
     184 * a GUID to give significance to the type of data. All chunks have an associated
     185 * size so that unknown chunks can be ignored for backwards compatibility!
     186 * EnumAddresses function is used to parse the address data chunks.
     187 */
     188
     189/* DPAID_TotalSize {1318F560-912C-11d0-9DAA-00A0C90A43CB}
     190 * Chunk purpose: Chunk is a DWORD containing the size of the entire DPADDRESS struct
     191 */
     192DEFINE_GUID(DPAID_TotalSize, 0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
     193
     194/* DPAID_ServiceProvider {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
     195 * Chunk purpose: Chunk is a GUID indicated what service provider created the chunk.
     196 */
     197DEFINE_GUID(DPAID_ServiceProvider, 0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     198
     199/* DPAID_LobbyProvider {59B95640-9667-11d0-A77D-0000F803ABFC}
     200 * Chunk purpose: Chunk is a GUID indicating what lobby provider created the chunk.
     201 */
     202DEFINE_GUID(DPAID_LobbyProvider, 0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
     203
     204/* DPAID_Phone  {78EC89A0-E0AF-11cf-9C4E-00A0C905425E} -- ANSI
     205 * DPAID_PhoneW {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E} -- UNICODE
     206 * Chunk purpose: Chunk is a phone number in ANSI or UNICODE format
     207 */
     208DEFINE_GUID(DPAID_Phone, 0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     209DEFINE_GUID(DPAID_PhoneW, 0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     210
     211/* DPAID_Modem  {F6DCC200-A2FE-11d0-9C4F-00A0C905425E} -- ANSI
     212 * DPAID_ModemW {01FD92E0-A2FF-11d0-9C4F-00A0C905425E} -- UNICODE
     213 * Chunk purpose: Chunk is a modem name registered with TAPI
     214 */
     215DEFINE_GUID(DPAID_Modem, 0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     216DEFINE_GUID(DPAID_ModemW, 0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     217
     218/* DPAID_INet  {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E} -- ANSI
     219 * DPAID_INetW {E63232A0-9DBF-11d0-9CC1-00A0C905425E} -- UNICODE
     220 * Chunk purpose: Chunk is a string containing a TCP/IP host name or IP address
     221 */
     222DEFINE_GUID(DPAID_INet, 0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     223DEFINE_GUID(DPAID_INetW, 0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     224
     225/* DPAID_INetPort {E4524541-8EA5-11d1-8A96-006097B01411}
     226 * Chunk purpose: Chunk is a port number used for creating TCP and UDP sockets. (WORD)
     227 */
     228DEFINE_GUID(DPAID_INetPort, 0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
     229
     230/* DPAID_ComPort {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
     231 * Chunk purpose: Chunk contains the description of a serial port.
     232 */
     233DEFINE_GUID(DPAID_ComPort, 0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
     234
     235
     236/* Header block for address data elements */
     237typedef struct tagDPADDRESS
     238{
     239    GUID                guidDataType;
     240    DWORD               dwDataSize;
     241} DPADDRESS, *LPDPADDRESS;
     242
     243
     244/* Used for specification of a communication port. Baud rate, stop bits and
     245 * parity bits can be found in winbase.h. These are flow control constants only.
     246 */
     247#define DPCPA_NOFLOW        0           /* no flow control */
     248#define DPCPA_XONXOFFFLOW   1           /* software flow control */
     249#define DPCPA_RTSFLOW       2           /* hardware flow control with RTS */
     250#define DPCPA_DTRFLOW       3           /* hardware flow control with DTR */
     251#define DPCPA_RTSDTRFLOW    4           /* hardware flow control with RTS and DTR */
     252
     253typedef struct tagDPCOMPORTADDRESS
     254{
     255    DWORD   dwComPort;                  /* COM port to use (1-4) */
     256    DWORD   dwBaudRate;                 /* baud rate (100-256k) */
     257    DWORD   dwStopBits;                 /* no. stop bits (1-2) */
     258    DWORD   dwParity;                   /* parity (none, odd, even, mark) */
     259    DWORD   dwFlowControl;              /* flow control (none, xon/xoff, rts, dtr) */
     260} DPCOMPORTADDRESS, *LPDPCOMPORTADDRESS;
     261
     262
     263
     264/****************************************************************************
    31265 * Miscellaneous
    32266 */
     
    37271    GUID        guidApplication;
    38272
    39     union appName
     273    union
    40274    {
    41275        LPSTR   lpszAppNameA;
    42276        LPWSTR  lpszAppName;
    43     };
     277    } appName;
    44278
    45279} DPLAPPINFO, *LPDPLAPPINFO;
     
    54288typedef const DPCOMPOUNDADDRESSELEMENT *LPCDPCOMPOUNDADDRESSELEMENT;
    55289
    56 
    57 extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
    58 extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
    59 
    60 
    61 
    62 typedef BOOL (CALLBACK* LPDPENUMADDRESSCALLBACK)(
     290typedef struct tagDPAPPLICATIONDESC
     291{
     292    DWORD       dwSize;
     293    DWORD       dwFlags;
     294
     295    union
     296    {
     297        LPSTR       lpszApplicationNameA;
     298        LPWSTR      lpszApplicationName;
     299    } appName;
     300
     301    GUID        guidApplication;
     302
     303    union
     304    {
     305        LPSTR       lpszFilenameA;
     306        LPWSTR      lpszFilename;
     307    } fileName;
     308
     309    union
     310    {
     311        LPSTR       lpszCommandLineA;
     312        LPWSTR      lpszCommandLine;
     313    } cmdLine;
     314
     315    union
     316    {
     317        LPSTR       lpszPathA;
     318        LPWSTR      lpszPath;
     319    } path;
     320
     321    union
     322    {
     323        LPSTR       lpszCurrentDirectoryA;
     324        LPWSTR      lpszCurrentDirectory;
     325    } curDir;
     326
     327    LPSTR       lpszDescriptionA;
     328    LPWSTR      lpszDescriptionW;
     329
     330} DPAPPLICATIONDESC, *LPDPAPPLICATIONDESC;
     331
     332
     333
     334extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY*,  IUnknown*, LPVOID, DWORD );
     335extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA*, IUnknown*, LPVOID, DWORD );
     336
     337
     338
     339typedef BOOL (* CALLBACK LPDPENUMADDRESSCALLBACK)(
    63340    REFGUID         guidDataType,
    64341    DWORD           dwDataSize,
     
    66343    LPVOID          lpContext );
    67344
    68 typedef BOOL (CALLBACK* LPDPLENUMADDRESSTYPESCALLBACK)(
     345typedef BOOL (* CALLBACK LPDPLENUMADDRESSTYPESCALLBACK)(
    69346    REFGUID         guidDataType,
    70347    LPVOID          lpContext,
    71348    DWORD           dwFlags );
    72349
    73 typedef BOOL (CALLBACK* LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
     350typedef BOOL (* CALLBACK LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
    74351    LPCDPLAPPINFO   lpAppInfo,
    75352    LPVOID          lpContext,
     
    79356
    80357/*****************************************************************************
    81  * IDirectPlayLobby interface
     358 * IDirectPlayLobby and IDirectPlayLobbyA interface
    82359 */
    83360#define ICOM_INTERFACE IDirectPlayLobby
     
    100377#undef ICOM_INTERFACE
    101378
    102 #ifdef ICOM_CINTERFACE
    103 /*** IUnknown methods ***/
    104 #define IDirectPlayLobby_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    105 #define IDirectPlayLobby_AddRef(p)             ICOM_CALL (AddRef,p)
    106 #define IDirectPlayLobby_Release(p)            ICOM_CALL (Release,p)
    107 /*** IDirectPlayLobby methods ***/
    108 #define IDirectPlayLobby_Connect(p,a,b,c)                 ICOM_CALL3(Connect,p,a,b,c)
    109 #define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f)     ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)
    110 #define IDirectPlayLobby_EnumAddress(p,a,b,c,d)           ICOM_CALL4(EnumAddress,p,a,b,c,d)
    111 #define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d)      ICOM_CALL4(EnumAddressTypes,p,a,b,c,d)
    112 #define IDirectPlayLobby_EnumLocalApplications(p,a,b,c)   ICOM_CALL3(EnumLocalApplications,p,a,b,c)
    113 #define IDirectPlayLobby_GetConnectionSettings(p,a,b,c)   ICOM_CALL3(GetConnectionSettings,p,a,b,c)
    114 #define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) ICOM_CALL5(ReceiveLobbyMessage,p,a,b,c,d,e)
    115 #define IDirectPlayLobby_RunApplication(p,a,b,c,d)        ICOM_CALL4(RunApplication,p,a,b,c,d)
    116 #define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d)      ICOM_CALL4(SendLobbyMessage,p,a,b,c,d)
    117 #define IDirectPlayLobby_SetConnectionSettings(p,a,b,c)   ICOM_CALL3(SetConnectionSettings,p,a,b,c)
    118 #define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c)    ICOM_CALL3(SetLobbyMessageEvent,p,a,b,c)
    119 #endif
    120 
    121 
    122 /*****************************************************************************
    123  * IDirectPlayLobby2 interface
     379/*****************************************************************************
     380 * IDirectPlayLobby2 and IDirectPlayLobby2A interface
    124381 */
    125382#define ICOM_INTERFACE IDirectPlayLobby2
     
    132389#undef ICOM_INTERFACE
    133390
    134 #ifdef ICOM_CINTERFACE
    135 /*** IUnknown methods ***/
    136 #define IDirectPlayLobby2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    137 #define IDirectPlayLobby2_AddRef(p)             ICOM_CALL (AddRef,p)
    138 #define IDirectPlayLobby2_Release(p)            ICOM_CALL (Release,p)
    139 /*** IDirectPlayLobby methods ***/
    140 #define IDirectPlayLobby2_Connect(p,a,b,c)                 ICOM_CALL3(Connect,p,a,b,c)
    141 #define IDirectPlayLobby2_CreateAddress(p,a,b,c,d,e,f)     ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)
    142 #define IDirectPlayLobby2_EnumAddress(p,a,b,c,d)           ICOM_CALL4(EnumAddress,p,a,b,c,d)
    143 #define IDirectPlayLobby2_EnumAddressTypes(p,a,b,c,d)      ICOM_CALL4(EnumAddressTypes,p,a,b,c,d)
    144 #define IDirectPlayLobby2_EnumLocalApplications(p,a,b,c)   ICOM_CALL3(EnumLocalApplications,p,a,b,c)
    145 #define IDirectPlayLobby2_GetConnectionSettings(p,a,b,c)   ICOM_CALL3(GetConnectionSettings,p,a,b,c)
    146 #define IDirectPlayLobby2_ReceiveLobbyMessage(p,a,b,c,d,e) ICOM_CALL5(ReceiveLobbyMessage,p,a,b,c,d,e)
    147 #define IDirectPlayLobby2_RunApplication(p,a,b,c,d)        ICOM_CALL4(RunApplication,p,a,b,c,d)
    148 #define IDirectPlayLobby2_SendLobbyMessage(p,a,b,c,d)      ICOM_CALL4(SendLobbyMessage,p,a,b,c,d)
    149 #define IDirectPlayLobby2_SetConnectionSettings(p,a,b,c)   ICOM_CALL3(SetConnectionSettings,p,a,b,c)
    150 #define IDirectPlayLobby2_SetLobbyMessageEvent(p,a,b,c)    ICOM_CALL3(SetLobbyMessageEvent,p,a,b,c)
    151 /*** IDirectPlayLobby2 methods ***/
    152 #define IDirectPlayLobby2_CreateCompoundAddress(p,a,b,c,d) ICOM_CALL4(CreateCompoundAddress,p,a,b,c,d)
    153 #endif
     391/*****************************************************************************
     392 * IDirectPlayLobby3 and IDirectPlayLobby3A interface
     393 */
     394#define ICOM_INTERFACE IDirectPlayLobby3
     395#define IDirectPlayLobby3_METHODS \
     396    ICOM_METHOD4( HRESULT, ConnectEx,                 DWORD,arg1, REFIID,arg2, LPVOID *,arg3, IUnknown *,arg4) \
     397    ICOM_METHOD2( HRESULT, RegisterApplication,       DWORD,arg1, LPDPAPPLICATIONDESC,arg2 ) \
     398    ICOM_METHOD2( HRESULT, UnregisterApplication,     DWORD,arg1, REFGUID,arg2 ) \
     399    ICOM_METHOD1( HRESULT, WaitForConnectionSettings, DWORD,arg1 )
     400
     401#define IDirectPlayLobby3_IMETHODS \
     402    IDirectPlayLobby2_IMETHODS \
     403    IDirectPlayLobby3_METHODS
     404ICOM_DEFINE(IDirectPlayLobby3,IDirectPlayLobby2)
     405#undef ICOM_INTERFACE
     406
     407#define IDirectPlayLobby_QueryInterface(p,a,b)              ICOM_CALL2(QueryInterface,p,a,b)
     408#define IDirectPlayLobby_AddRef(p)                          ICOM_CALL (AddRef,p)
     409#define IDirectPlayLobby_Release(p)                         ICOM_CALL (Release,p)
     410#define IDirectPlayLobby_Connect(p,a,b,c)                   ICOM_CALL3(Connect,p,a,b,c)
     411#define IDirectPlayLobby_ConnectEx(p,a,b,c,d)               ICOM_CALL4(ConnectEx,p,a,b,c,d)
     412#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f)       ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)
     413#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d)   ICOM_CALL4(CreateCompoundAddress,p,a,b,c,d)
     414#define IDirectPlayLobby_EnumAddress(p,a,b,c,d)             ICOM_CALL4(EnumAddress,p,a,b,c,d)
     415#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d)        ICOM_CALL4(EnumAddressTypes,p,a,b,c,d)
     416#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c)     ICOM_CALL3(EnumLocalApplications,p,a,b,c)
     417#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c)     ICOM_CALL3(GetConnectionSettings,p,a,b,c)
     418#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e)   ICOM_CALL5(ReceiveLobbyMessage,p,a,b,c,d,e)
     419#define IDirectPlayLobby_RegisterApplication(p,a,b)         ICOM_CALL2(RegisterApplication,p,a,b)
     420#define IDirectPlayLobby_RunApplication(p,a,b,c,d)          ICOM_CALL4(RunApplication,p,a,b,c,d)
     421#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d)        ICOM_CALL4(SendLobbyMessage,p,a,b,c,d)
     422#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c)     ICOM_CALL3(SetConnectionSettings,p,a,b,c)
     423#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c)      ICOM_CALL3(SetLobbyMessageEvent,p,a,b,c)
     424#define IDirectPlayLobby_UnregisterApplication(p,a,b)       ICOM_CALL2(UnregisterApplication,p,a,b)
     425#define IDirectPlayLobby_WaitForConnectionSettings(p,a)     ICOM_CALL1(WaitForConnectionSettings,p,a)
     426
     427/* Used for WaitForConnectionSettings */
     428#define DPLWAIT_CANCEL                  0x00000001
    154429
    155430#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.