source: trunk/src/DPlayX/dplayx_messages.h@ 4314

Last change on this file since 4314 was 4314, checked in by hugh, 25 years ago

Updated to latest wine version

File size: 4.1 KB
Line 
1
2#ifndef __WINE_DPLAYX_MESSAGES__
3#define __WINE_DPLAYX_MESSAGES__
4
5#include "windef.h"
6#include "dplay.h"
7//#include "rpc.h" /* For GUID */
8
9#include "dplay_global.h"
10
11DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
12 HANDLE hDeath, HANDLE hConnRead );
13
14
15/* Message types etc. */
16#include "pshpack1.h"
17
18/* Non provided messages for DPLAY - guess work which may be wrong :( */
19#define DPMSGCMD_ENUMSESSIONSREPLY 1
20#define DPMSGCMD_ENUMSESSIONSREQUEST 2
21
22#define DPMSGCMD_GETSETNAMETABLE 3 /* Request info from NS about
23 existing players/groups etc. Is
24 also used for reply */
25
26#define DPMSGCMD_REQUESTNEWPLAYERID 5
27
28#define DPMSGCMD_NEWPLAYERIDREPLY 7
29#define DPMSGCMD_CREATESESSION 8
30#define DPMSGCMD_CREATENEWPLAYER 9
31#define DPMSGCMD_SYSTEMMESSAGE 10
32#define DPMSGCMD_DELETEPLAYER 11
33#define DPMSGCMD_DELETEGROUP 12
34
35#define DPMSGCMD_ENUMGROUPS 17
36
37#define DPMSGCMD_FORWARDCREATEPLAYER 19 /* This may be a get name table req */
38
39/* This is what DP 6 defines it as. Don't know what it means. All messages
40 * defined below are DPMSGVER_DP6.
41 */
42#define DPMSGVER_DP6 11
43
44/* MAGIC number at the start of all dplay packets ("play" in ASCII) */
45#define DPMSGMAGIC_DPLAYMSG 0x79616c70
46
47/* All messages sent from the system are sent with this at the beginning of
48 * the message.
49 */
50
51/* Size is 4 bytes */
52typedef struct tagDPMSG_SENDENVELOPE
53{
54 DWORD dwMagic;
55 WORD wCommandId;
56 WORD wVersion;
57} DPMSG_SENDENVELOPE, *LPDPMSG_SENDENVELOPE;
58typedef const DPMSG_SENDENVELOPE* LPCDPMSG_SENDENVELOPE;
59
60typedef struct tagDPMSG_SYSMSGENVELOPE
61{
62 DWORD dwPlayerFrom;
63 DWORD dwPlayerTo;
64} DPMSG_SYSMSGENVELOPE, *LPDPMSG_SYSMSGENVELOPE;
65typedef const DPMSG_SYSMSGENVELOPE* LPCDPMSG_SYSMSGENVELOPE;
66
67
68typedef struct tagDPMSG_ENUMSESSIONSREPLY
69{
70 DPMSG_SENDENVELOPE envelope;
71
72#if 0
73 DWORD dwSize; /* Size of DPSESSIONDESC2 struct */
74 DWORD dwFlags; /* Sessions flags */
75
76 GUID guidInstance; /* Not 100% sure this is what it is... */
77
78 GUID guidApplication;
79
80 DWORD dwMaxPlayers;
81 DWORD dwCurrentPlayers;
82
83 BYTE unknown[36];
84#else
85 DPSESSIONDESC2 sd;
86#endif
87
88 DWORD dwUnknown; /* Seems to be equal to 0x5c which is a "\\" */
89 /* Encryption package string? */
90
91 /* At the end we have ... */
92 /* WCHAR wszSessionName[1]; Var length with NULL terminal */
93
94} DPMSG_ENUMSESSIONSREPLY, *LPDPMSG_ENUMSESSIONSREPLY;
95typedef const DPMSG_ENUMSESSIONSREPLY* LPCDPMSG_ENUMSESSIONSREPLY;
96
97typedef struct tagDPMSG_ENUMSESSIONSREQUEST
98{
99 DPMSG_SENDENVELOPE envelope;
100
101 GUID guidApplication;
102
103 DWORD dwPasswordSize; /* A Guess. This is normally 0x00000000. */
104 /* This might be the name server DPID which
105 is needed for the reply */
106
107 DWORD dwFlags; /* dwFlags from EnumSessions */
108
109} DPMSG_ENUMSESSIONSREQUEST, *LPDPMSG_ENUMSESSIONSREQUEST;
110typedef const DPMSG_ENUMSESSIONSREQUEST* LPCDPMSG_ENUMSESSIONSREQUEST;
111
112/* Size is 146 received - with 18 or 20 bytes header = ~128 bytes */
113typedef struct tagDPMSG_CREATESESSION
114{
115 DPMSG_SENDENVELOPE envelope;
116} DPMSG_CREATESESSION, *LPDPMSG_CREATESESSION;
117typedef const DPMSG_CREATESESSION* LPCDPMSG_CREATESESSION;
118
119/* 12 bytes msg */
120typedef struct tagDPMSG_REQUESTNEWPLAYERID
121{
122 DPMSG_SENDENVELOPE envelope;
123
124 DWORD dwFlags; /* dwFlags used for CreatePlayer */
125
126} DPMSG_REQUESTNEWPLAYERID, *LPDPMSG_REQUESTNEWPLAYERID;
127typedef const DPMSG_REQUESTNEWPLAYERID* LPCDPMSG_REQUESTNEWPLAYERID;
128
129/* 64 byte - ~18 header ~= 46 bytes msg */
130typedef struct tagDPMSG_NEWPLAYERIDREPLY
131{
132 DPMSG_SENDENVELOPE envelope;
133
134#if 0
135 DPID dpidNewPlayerId;
136#else
137 BYTE unknown[38];
138#endif
139
140} DPMSG_NEWPLAYERIDREPLY, *LPDPMSG_NEWPLAYERIDREPLY;
141typedef const DPMSG_NEWPLAYERIDREPLY* LPCDPMSG_NEWPLAYERIDREPLY;
142
143#include "poppack.h"
144
145
146HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags,
147 LPDPID lpdipidAllocatedId );
148
149/* FIXME: I don't think that this is a needed method */
150HRESULT DP_MSG_OpenStream( IDirectPlay2AImpl* This );
151
152
153#endif
Note: See TracBrowser for help on using the repository browser.