ReactOS 0.4.17-dev-966-gf06eace
dplayx_messages.h
Go to the documentation of this file.
1/*
2 * Copyright 2000 Peter Hunnisett
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#ifndef __WINE_DPLAYX_MESSAGES__
20#define __WINE_DPLAYX_MESSAGES__
21
22#include <stdarg.h>
23
24#include "windef.h"
25#include "winbase.h"
26#include "dplay.h"
27#include "rpc.h" /* For GUID */
28
29#include "dplay_global.h"
30
31typedef struct
32{
40 void *spData;
47
49 HANDLE hDeath, HANDLE hConnRead );
50
53 LPDPID lpdipidAllocatedId );
55 DPPLAYERINFO *playerInfo );
58 DPNAME *name, void *playerData, DWORD playerDataSize,
59 DPID systemPlayerId );
61 DPID groupId );
64
66 LPCVOID lpMsgBody, DWORD dwMsgBodySize,
67 const void *msgHeader );
68void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf );
69
70/* Timings -> 1000 ticks/sec */
71#define DPMSG_WAIT_5_SECS 5000
72#define DPMSG_WAIT_30_SECS 30000
73#define DPMSG_WAIT_60_SECS 60000
74#define DPMSG_DEFAULT_WAIT_TIME DPMSG_WAIT_30_SECS
75
76/* Message types etc. */
77#include "pshpack1.h"
78
79typedef struct
80{
94
95/* Non provided messages for DPLAY - guess work which may be wrong :( */
96#define DPMSGCMD_ENUMSESSIONSREPLY 1
97#define DPMSGCMD_ENUMSESSIONSREQUEST 2
98#define DPMSGCMD_GETNAMETABLEREPLY 3 /* Contains all existing players in session */
99
100#define DPMSGCMD_REQUESTNEWPLAYERID 5
101
102#define DPMSGCMD_NEWPLAYERIDREPLY 7
103#define DPMSGCMD_CREATESESSION 8 /* Might be a create nameserver or new player msg */
104#define DPMSGCMD_CREATENEWPLAYER 9
105#define DPMSGCMD_SYSTEMMESSAGE 10
106#define DPMSGCMD_DELETEPLAYER 11
107#define DPMSGCMD_DELETEGROUP 12
108#define DPMSGCMD_ADDPLAYERTOGROUP 13
109
110#define DPMSGCMD_GROUPDATACHANGED 17
111
112#define DPMSGCMD_FORWARDADDPLAYER 19
113
114#define DPMSGCMD_PING 22
115#define DPMSGCMD_PINGREPLY 23
116
117#define DPMSGCMD_FORWARDADDPLAYERNACK 36
118
119#define DPMSGCMD_SUPERENUMPLAYERSREPLY 41
120
121#define DPMSGCMD_ADDFORWARD 46
122#define DPMSGCMD_ADDFORWARDACK 47
123
124#define DPMSGCMD_JUSTENVELOPE 1000
125#define DPMSGCMD_JUSTENVELOPEREPLY 1001
126
127/* This is what DP 6 defines it as. Don't know what it means. All messages
128 * defined below are DPMSGVER_DP6.
129 */
130#define DPMSGVER_DP6 11
131
132/* MAGIC number at the start of all dplay packets ("play" in ASCII) */
133#define DPMSGMAGIC_DPLAYMSG 0x79616c70
134
135/* All messages sent from the system are sent with this at the beginning of
136 * the message.
137 * Size is 8 bytes
138 */
140{
146
147/* System messages exchanged between players seems to have this
148 * payload envelope on top of the basic envelope
149 */
151{
156
157/* Reply sent in response to an enumsession request */
159{
161
162#if 0
163 DWORD dwSize; /* Size of DPSESSIONDESC2 struct */
164 DWORD dwFlags; /* Sessions flags */
165
166 GUID guidInstance; /* Not 100% sure this is what it is... */
167
168 GUID guidApplication;
169
170 DWORD dwMaxPlayers;
171 DWORD dwCurrentPlayers;
172
173 BYTE unknown[36];
174#else
176#endif
177
178 DWORD dwUnknown; /* Seems to be equal to 0x5c which is a "\\" */
179 /* Encryption package string? */
180
181 /* At the end we have ... */
182 /* WCHAR wszSessionName[1]; Var length with NULL terminal */
183
186
187/* Msg sent to find out what sessions are available */
189{
191
193
195
196 DWORD dwFlags; /* dwFlags from EnumSessions */
197
200
201/* Size is 146 received - with 18 or 20 bytes header = ~128 bytes */
203{
212
213/* 12 bytes msg */
215{
217
218 DWORD dwFlags; /* dwFlags used for CreatePlayer */
219
222
223/* 48 bytes msg */
225{
227
229
236
237typedef struct
238{
246
247typedef struct
248{
255
257{
259
267
268/* This is an error message that can be received. Not sure if this is
269 * specifically for a forward add player or for all errors
270 */
272{
277
278typedef struct
279{
286
287#define DPLAYI_SUPERPACKEDPLAYER_SHORT_NAME_PRESENT 0x001
288#define DPLAYI_SUPERPACKEDPLAYER_LONG_NAME_PRESENT 0x002
289#define DPLAYI_SUPERPACKEDPLAYER_SP_DATA_LENGTH_SIZE( mask ) (((mask) >> 2) & 0x3)
290#define DPLAYI_SUPERPACKEDPLAYER_PLAYER_DATA_LENGTH_SIZE( mask ) (((mask) >> 4) & 0x3)
291#define DPLAYI_SUPERPACKEDPLAYER_PLAYER_COUNT_SIZE( mask ) (((mask) >> 6) & 0x3)
292#define DPLAYI_SUPERPACKEDPLAYER_PARENT_ID_PRESENT 0x100
293#define DPLAYI_SUPERPACKEDPLAYER_SHORTCUT_COUNT_SIZE( mask ) (((mask) >> 9) & 0x3)
294
295typedef struct
296{
301
302typedef struct
303{
307
308typedef struct
309{
319
320typedef struct
321{
329
330typedef struct
331{
335
336#include "poppack.h"
337
338#endif
static UCHAR password[]
Definition: bcrypt.c:520
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1674
DWORD * LPDPID
Definition: dplay.h:158
DWORD DPID
Definition: dplay.h:158
HRESULT DP_MSG_ReadPackedPlayer(char *data, DWORD *offset, DWORD maxSize, DPPLAYERINFO *playerInfo)
void DP_MSG_ReplyReceived(IDirectPlayImpl *This, WORD wCommandId, LPCVOID lpMsgBody, DWORD dwMsgBodySize, const void *msgHeader)
struct tagDPMSG_ENUMSESSIONSREQUEST * LPDPMSG_ENUMSESSIONSREQUEST
const DPMSG_SENDENVELOPE * LPCDPMSG_SENDENVELOPE
struct tagDPMSG_NEWPLAYERIDREPLY DPMSG_NEWPLAYERIDREPLY
struct tagDPMSG_REQUESTNEWPLAYERID * LPDPMSG_REQUESTNEWPLAYERID
const DPMSG_ENUMSESSIONSREPLY * LPCDPMSG_ENUMSESSIONSREPLY
struct tagDPMSG_ENUMSESSIONSREPLY DPMSG_ENUMSESSIONSREPLY
const DPMSG_FORWARDADDPLAYER * LPCDPMSG_FORWARDADDPLAYER
struct tagDPMSG_CREATESESSION DPMSG_CREATESESSION
HRESULT DP_MSG_SendAddPlayerToGroup(IDirectPlayImpl *This, DPID toId, DPID playerId, DPID groupId)
struct tagDPMSG_SYSMSGENVELOPE * LPDPMSG_SYSMSGENVELOPE
HRESULT DP_MSG_ForwardPlayerCreation(IDirectPlayImpl *This, DPID dpidServer, WCHAR *password)
struct tagDPMSG_REQUESTNEWPLAYERID DPMSG_REQUESTNEWPLAYERID
struct tagDPMSG_SENDENVELOPE * LPDPMSG_SENDENVELOPE
struct tagDPMSG_ENUMSESSIONSREPLY * LPDPMSG_ENUMSESSIONSREPLY
DWORD CreateLobbyMessageReceptionThread(HANDLE hNotifyEvent, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead)
const DPMSG_NEWPLAYERIDREPLY * LPCDPMSG_NEWPLAYERIDREPLY
struct tagDPMSG_CREATESESSION * LPDPMSG_CREATESESSION
const DPMSG_REQUESTNEWPLAYERID * LPCDPMSG_REQUESTNEWPLAYERID
void DP_MSG_ToSelf(IDirectPlayImpl *This, DPID dpidSelf)
struct tagDPMSG_FORWARDADDPLAYERNACK * LPDPMSG_FORWARDADDPLAYERNACK
HRESULT DP_MSG_SendPingReply(IDirectPlayImpl *This, DPID toId, DPID fromId, DWORD tickCount)
HRESULT DP_MSG_SendRequestPlayerId(IDirectPlayImpl *This, DWORD dwFlags, LPDPID lpdipidAllocatedId)
struct tagDPMSG_SENDENVELOPE DPMSG_SENDENVELOPE
struct tagDPMSG_SYSMSGENVELOPE DPMSG_SYSMSGENVELOPE
struct tagDPMSG_ENUMSESSIONSREQUEST DPMSG_ENUMSESSIONSREQUEST
HRESULT DP_MSG_SendAddForwardAck(IDirectPlayImpl *This, DPID id)
struct tagDPMSG_NEWPLAYERIDREPLY * LPDPMSG_NEWPLAYERIDREPLY
DWORD DP_MSG_ComputeMessageSize(SGBUFFER *buffers, DWORD bufferCount)
struct tagDPMSG_FORWARDADDPLAYERNACK DPMSG_FORWARDADDPLAYERNACK
const DPMSG_FORWARDADDPLAYERNACK * LPCDPMSG_FORWARDADDPLAYERNACK
const DPMSG_SYSMSGENVELOPE * LPCDPMSG_SYSMSGENVELOPE
const DPMSG_ENUMSESSIONSREQUEST * LPCDPMSG_ENUMSESSIONSREQUEST
struct tagDPMSG_FORWARDADDPLAYER * LPDPMSG_FORWARDADDPLAYER
const DPMSG_CREATESESSION * LPCDPMSG_CREATESESSION
struct tagDPMSG_FORWARDADDPLAYER DPMSG_FORWARDADDPLAYER
HRESULT DP_MSG_SendCreatePlayer(IDirectPlayImpl *This, DPID toId, DPID id, DWORD flags, DPNAME *name, void *playerData, DWORD playerDataSize, DPID systemPlayerId)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLintptr offset
Definition: glext.h:5920
GLbitfield flags
Definition: glext.h:7161
const GLuint * buffers
Definition: glext.h:5916
CONST void * LPCVOID
Definition: minwindef.h:164
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
short WCHAR
Definition: pedump.c:58
DWORD playerDataLength
DPID * shortcutIds
DWORD versionOrSystemPlayerId
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
Definition: name.c:39
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
DPMSG_SENDENVELOPE envelope
unsigned char BYTE
Definition: xxhash.c:193