36#define ARRAYSIZE(a) ARRAY_SIZE(a)
43#define check(expected, result) \
44 ok( (expected) == (result), \
45 "expected=%d got=%d\n", \
46 (int)(expected), (int)(result) );
47#define checkLP(expected, result) \
48 ok( (expected) == (result), \
49 "expected=%p got=%p\n", \
51#define checkHR(expected, result) \
52 ok( (expected) == (result), \
53 "expected=%s got=%s\n", \
54 dpResult2str(expected), dpResult2str(result) );
55#define checkStr(expected, result) \
56 ok( (result != NULL) && (!strcmp(expected, result)), \
57 "expected=%s got=%s\n", \
60#define checkFlags(expected, result, flags) checkFlags_(__LINE__, expected, result, flags)
64 "expected=0x%08lx(%s) got=0x%08lx(%s)\n",
68#define checkGuid(expected, result) \
69 ok( IsEqualGUID(expected, result), \
70 "expected=%s got=%s\n", \
71 Guid2str(expected), Guid2str(result) );
72#define checkConv(expected, result, function) \
73 ok( (expected) == (result), \
74 "expected=0x%08x(%s) got=0x%08lx(%s)\n", \
75 expected, function(expected), \
76 result, function(result) );
78#define AW( str, ansi ) ((ansi) ? (const void *) str : (const void *) L##str)
90DEFINE_GUID(appGuid, 0xbdcfe03e, 0xf0ec, 0x415b, 0x82, 0x11, 0x6f, 0x86, 0xd8, 0x19, 0x7f, 0xe1);
91DEFINE_GUID(appGuid2, 0x93417d3f, 0x7d26, 0x46ba, 0xb5, 0x76, 0xfe, 0x4b, 0x20, 0xbb, 0xad, 0x70);
92DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
93DEFINE_GUID(invalid_guid, 0x7b48b707, 0x0034, 0xc000, 0x02, 0x00, 0x00, 0x00, 0xec, 0xf6, 0x32, 0x00);
117 static char buff[10][256];
128 if (!
guid)
return "(null)";
132 return "DPSPGUID_IPX";
134 return "DPSPGUID_TCPIP";
136 return "DPSPGUID_SERIAL";
138 return "DPSPGUID_MODEM";
141 return "DPAID_TotalSize";
143 return "DPAID_ServiceProvider";
145 return "DPAID_LobbyProvider";
147 return "DPAID_Phone";
149 return "DPAID_PhoneW";
151 return "DPAID_Modem";
153 return "DPAID_ModemW";
157 return "DPAID_INetW";
159 return "DPAID_INetPort";
161 return "DPAID_ComPort";
171 case DP_OK:
return "DP_OK";
270 default:
return "UNKNOWN";
277#define FLAGS_DPCONNECTION (1<<0)
278#define FLAGS_DPENUMPLAYERS (1<<1)
279#define FLAGS_DPENUMGROUPS (1<<2)
280#define FLAGS_DPPLAYER (1<<3)
281#define FLAGS_DPGROUP (1<<4)
282#define FLAGS_DPENUMSESSIONS (1<<5)
283#define FLAGS_DPGETCAPS (1<<6)
284#define FLAGS_DPGET (1<<7)
285#define FLAGS_DPRECEIVE (1<<8)
286#define FLAGS_DPSEND (1<<9)
287#define FLAGS_DPSET (1<<10)
288#define FLAGS_DPMESSAGEQUEUE (1<<11)
289#define FLAGS_DPCONNECT (1<<12)
290#define FLAGS_DPOPEN (1<<13)
291#define FLAGS_DPSESSION (1<<14)
292#define FLAGS_DPLCONNECTION (1<<15)
293#define FLAGS_DPESC (1<<16)
294#define FLAGS_DPCAPS (1<<17)
608 for (
i=0;
i<dpidSize;
i++)
610 if ( idPlayer == dpid[
i] )
648 DWORD dwDataSize = 1024;
657 lpData, &dwDataSize )) )
1023#define bindUdp( port ) bindUdp_( __LINE__, port )
1038 ok_( __FILE__,
line)( !wsResult,
"bind() returned %d.\n", wsResult );
1041 ok_( __FILE__,
line)( !wsResult,
"ioctlsocket() returned %d.\n", wsResult );
1046#define listenTcp( port ) listenTcp_( __LINE__, port )
1069 ok_( __FILE__,
line)( wsResult !=
SOCKET_ERROR,
"ioctlsocket() returned %d.\n", wsResult );
1074#define acceptTcp( listenSock ) acceptTcp_( __LINE__, listenSock )
1085 FD_SET( listenSock, &fds );
1091 addrSize =
sizeof(
addr );
1097#define checkNoMoreAccepts( listenSock ) checkNoMoreAccepts_( __LINE__, listenSock )
1105 FD_SET( listenSock, &fds );
1109 ok_( __FILE__,
line )( !wsResult,
"select() returned %d.\n", wsResult );
1112#define connectTcp( port ) connectTcp_( __LINE__, port )
1126 ok_( __FILE__,
line)( !wsResult,
"connect returned %d.\n", wsResult );
1131#define connectUdp( port ) connectUdp_( __LINE__, port)
1145 ok_( __FILE__,
line)( !wsResult,
"connect returned %d.\n", wsResult );
1150#define receiveMessage( sock, buffer, size ) receiveMessage_( __LINE__, sock, buffer, size )
1171#define checkNoMoreMessages( sock ) checkNoMoreMessages_( __LINE__, sock )
1186 ok_( __FILE__,
line )( !wsResult || wsResult ==
SOCKET_ERROR,
"recv() returned %d.\n", wsResult );
1189#define checkSpHeader( header, expectedSize ) checkSpHeader_( __LINE__, header, expectedSize )
1192 ok_( __FILE__,
line )(
header->mixed == 0xfab00000 + expectedSize,
"got mixed %#lx.\n",
header->mixed );
1195 "got port %d.\n",
ntohs(
header->addr.sin_port ) );
1196 ok_( __FILE__,
line )( !
header->addr.sin_addr.s_addr,
"got address %#lx.\n",
header->addr.sin_addr.s_addr );
1201#define checkMessageHeader( header, expectedCommand ) checkMessageHeader_( __LINE__, header, expectedCommand )
1205 ok_( __FILE__,
line )(
header->command == expectedCommand,
"got command %d.\n",
header->command );
1208#define checkSpData( spData ) checkSpData_( __LINE__, spData, udpPort )
1226#define checkPackedPlayer( player, expectedFlags, expectedId, expectedShortNameLength, expectedLongNameLength, \
1227 expectedPlayerDataSize, expectedSystemPlayerId ) \
1228 checkPackedPlayer_( __LINE__, player, expectedFlags, expectedId, expectedShortNameLength, expectedLongNameLength, \
1229 expectedPlayerDataSize, expectedSystemPlayerId )
1231 DWORD expectedShortNameLength,
DWORD expectedLongNameLength,
1232 DWORD expectedPlayerDataSize,
DPID expectedSystemPlayerId )
1234 DWORD expectedSize =
sizeof(
PackedPlayer ) + expectedShortNameLength + expectedLongNameLength +
sizeof(
SpData )
1235 + expectedPlayerDataSize;
1237 ok_( __FILE__,
line )( player->
size == expectedSize,
"got player info size %lu.\n", player->
size );
1238 ok_( __FILE__,
line )( player->
flags == expectedFlags,
"got flags %#lx.\n", player->
flags );
1239 ok_( __FILE__,
line )( player->
id == expectedId,
"got player info player id %#lx.\n", player->
id );
1240 ok_( __FILE__,
line )( player->
shortNameLength == expectedShortNameLength,
"got short name length %lu.\n",
1242 ok_( __FILE__,
line )( player->
longNameLength == expectedLongNameLength,
"got long name length %lu.\n",
1245 ok_( __FILE__,
line )( player->
playerDataSize == expectedPlayerDataSize,
"got player data size %lu.\n",
1248 ok_( __FILE__,
line )( player->
systemPlayerId == expectedSystemPlayerId,
"got system player id %#lx.\n",
1254#define checkGameMessage( message, expectedFromId, expectedToId ) \
1255 checkGameMessage_( __LINE__, message, expectedFromId, expectedToId )
1258 ok_( __FILE__,
line )(
message->fromId == expectedFromId,
"got source id %#lx.\n",
message->fromId );
1259 ok_( __FILE__,
line )(
message->toId == expectedToId,
"got destination id %#lx.\n",
message->toId );
1262#define receiveEnumSessionsRequest( sock, expectedAppGuid, expectedPassword, expectedFlags ) \
1263 receiveEnumSessionsRequest_( __LINE__, sock, expectedAppGuid, expectedPassword, expectedFlags )
1265 const WCHAR *expectedPassword,
DWORD expectedFlags )
1267#include "pshpack1.h"
1275 DWORD expectedPasswordSize;
1276 unsigned short port;
1280 expectedPasswordSize = expectedPassword ? (
lstrlenW( expectedPassword ) + 1) *
sizeof(
WCHAR ) : 0;
1281 expectedSize =
sizeof(
request.spHeader ) +
sizeof(
request.request ) + expectedPasswordSize;
1284 ok_( __FILE__,
line )( wsResult == expectedSize,
"recv() returned %d.\n", wsResult );
1292 if ( expectedPassword )
1294 ok_( __FILE__,
line )(
request.request.passwordOffset == 32,
"got password offset %lu.\n",
1295 request.request.passwordOffset );
1301 ok_( __FILE__,
line )( !
request.request.passwordOffset,
"got password offset %lu.\n",
1302 request.request.passwordOffset );
1309#define sendEnumSessionsReply( sock, port, dpsd ) sendEnumSessionsReply_( __LINE__, sock, port, dpsd )
1312#include "pshpack1.h"
1322 .mixed = 0xfab00000,
1333 .magic = 0x79616c70,
1338 .nameOffset =
sizeof( reply.reply ),
1347 size =
sizeof( reply.spHeader ) +
sizeof( reply.reply ) + passwordSize;
1349 reply.spHeader.mixed +=
size;
1350 reply.reply.dpsd.lpszSessionName =
NULL;
1351 reply.reply.dpsd.lpszPassword =
NULL;
1355 ok_( __FILE__,
line )( wsResult ==
size,
"send() returned %d.\n", wsResult );
1358#define receiveRequestPlayerId( sock, expectedFlags ) receiveRequestPlayerId_( __LINE__, sock, expectedFlags )
1361#include "pshpack1.h"
1368 unsigned short port;
1372 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"recv() returned %d.\n", wsResult );
1381#define sendRequestPlayerReply( sock, port, id, result ) sendRequestPlayerReply_( __LINE__, sock, port, id, result )
1384#include "pshpack1.h"
1393 .mixed = 0xfab00000 +
sizeof( reply ),
1404 .magic = 0x79616c70,
1415 wsResult =
send(
sock, (
char *) &reply,
sizeof( reply ), 0 );
1416 ok_( __FILE__,
line )( wsResult ==
sizeof( reply ),
"send() returned %d.\n", wsResult );
1419#define receiveAddForwardRequest( sock, expectedPlayerId, expectedPassword, expectedTickCount, udpPort ) \
1420 receiveAddForwardRequest_( __LINE__, sock, expectedPlayerId, expectedPassword, expectedTickCount, udpPort )
1422 const WCHAR *expectedPassword,
DWORD expectedTickCount,
1423 unsigned short *udpPort )
1425#include "pshpack1.h"
1432 DWORD expectedPasswordSize;
1434 unsigned short port;
1439 expectedPasswordSize = (
lstrlenW( expectedPassword ) + 1) *
sizeof(
WCHAR );
1440 expectedSize =
sizeof(
request ) + expectedPasswordSize +
sizeof(
DWORD );
1443 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"recv() returned %d.\n", wsResult );
1450 ok_( __FILE__,
line )(
request.request.playerId == expectedPlayerId,
"got player id %#lx.\n",
1453 ok_( __FILE__,
line )(
request.request.createOffset == 28,
"got create offset %lu.\n",
1454 request.request.createOffset );
1455 ok_( __FILE__,
line )(
request.request.passwordOffset == 108,
"got password offset %lu.\n",
1456 request.request.passwordOffset );
1462 ok_( __FILE__,
line )( wsResult == expectedPasswordSize,
"recv() returned %d.\n", wsResult );
1467 ok_( __FILE__,
line )( wsResult ==
sizeof(
DWORD ),
"recv() returned %d.\n", wsResult );
1468 ok_( __FILE__,
line )( tickCount == expectedTickCount,
"got tick count %#lx.\n", tickCount );
1473#define sendSuperEnumPlayersReply( sock, tcpPort, udpPort, dpsd, sessionName ) \
1474 sendSuperEnumPlayersReply_( __LINE__, sock, tcpPort, udpPort, dpsd, sessionName )
1478#define SHORT_NAME L"short name"
1479#define LONG_NAME L"long name"
1480#include "pshpack1.h"
1486 WCHAR sessionName[ 256 ];
1504 BYTE playerDataLength;
1505 BYTE playerData[ 4 ];
1520 BYTE playerDataLength;
1521 BYTE playerData[ 4 ];
1525 DPID playerIds[ 1 ];
1531 .mixed = 0xfab00000 +
sizeof( reply ),
1535 .sin_port =
htons( tcpPort ),
1542 .magic = 0x79616c70,
1548 .packedOffset =
sizeof( reply.reply ) +
sizeof( reply.dpsd ) +
sizeof( reply.sessionName ),
1550 .descriptionOffset =
sizeof( reply.reply ),
1551 .nameOffset =
sizeof( reply.reply ) +
sizeof( reply.dpsd ),
1552 .passwordOffset = 0,
1557 .superPackedPlayer =
1563 .versionOrSystemPlayerId = 14,
1565 .spDataLength =
sizeof(
SpData ),
1571 .sin_port =
htons( tcpPort ),
1576 .sin_port =
htons( udpPort ),
1582 .superPackedPlayer =
1588 .versionOrSystemPlayerId = 14,
1590 .spDataLength =
sizeof(
SpData ),
1596 .sin_port =
htons( tcpPort ),
1601 .sin_port =
htons( udpPort ),
1607 .superPackedPlayer =
1613 .versionOrSystemPlayerId = 0x51573,
1617 .playerDataLength = 4,
1618 .playerData = { 1, 2, 3, 4, },
1619 .spDataLength =
sizeof(
SpData ),
1625 .sin_port =
htons( tcpPort ),
1630 .sin_port =
htons( udpPort ),
1636 .superPackedPlayer =
1642 .versionOrSystemPlayerId = 0x51573,
1644 .spDataLength =
sizeof(
SpData ),
1650 .sin_port =
htons( tcpPort ),
1655 .sin_port =
htons( udpPort ),
1661 .superPackedPlayer =
1667 .versionOrSystemPlayerId = 0x51573,
1671 .playerDataLength = 4,
1672 .playerData = { 1, 2, 3, 4, },
1673 .spDataLength =
sizeof(
SpData ),
1679 .sin_port =
htons( tcpPort ),
1684 .sin_port =
htons( udpPort ),
1688 .playerIds = { 0xd00de, },
1696 reply.dpsd.lpszSessionName =
NULL;
1697 reply.dpsd.lpszPassword =
NULL;
1699 lstrcpyW( reply.sessionName, sessionName );
1701 wsResult =
send(
sock, (
char *) &reply,
sizeof( reply ), 0 );
1702 ok_( __FILE__,
line )( wsResult ==
sizeof( reply ),
"send() returned %d.\n", wsResult );
1705#define sendAddForwardReply( sock, port, result ) sendAddForwardReply_( __LINE__, sock, port, result )
1708#include "pshpack1.h"
1717 .mixed = 0xfab00000 +
sizeof( reply ),
1728 .magic = 0x79616c70,
1738 wsResult =
send(
sock, (
char *) &reply,
sizeof( reply ), 0 );
1739 ok_( __FILE__,
line )( wsResult ==
sizeof( reply ),
"send() returned %d.\n", wsResult );
1742#define sendAddForward( sock, port, tcpPort, udpPort ) sendAddForward_( __LINE__, sock, port, tcpPort, udpPort )
1745#include "pshpack1.h"
1754 .mixed = 0xfab00000 +
sizeof( reply ),
1765 .magic = 0x79616c70,
1770 .playerId = 0x07734,
1773 .passwordOffset = 0,
1776 .size = 48 +
sizeof(
SpData ),
1779 .shortNameLength = 0,
1780 .longNameLength = 0,
1781 .spDataSize =
sizeof(
SpData ),
1782 .playerDataSize = 0,
1784 .systemPlayerId = 0x07734,
1786 .playerVersion = 14,
1793 .sin_port =
htons( tcpPort ),
1798 .sin_port =
htons( udpPort ),
1807 wsResult =
send(
sock, (
char *) &reply,
sizeof( reply ), 0 );
1808 ok_( __FILE__,
line )( wsResult ==
sizeof( reply ),
"send() returned %d.\n", wsResult );
1811#define receiveAddForwardAck( sock, expectedPlayerId ) receiveAddForwardAck_( __LINE__, sock, expectedPlayerId )
1814#include "pshpack1.h"
1821 unsigned short port;
1825 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"recv() returned %d.\n", wsResult );
1833#define receiveCreatePlayer( sock, expectedPlayerId, expectedFlags, expectedShortName, expectedLongName, \
1834 expectedPlayerData, expectedPlayerDataSize ) \
1835 receiveCreatePlayer_( __LINE__, sock, expectedPlayerId, expectedFlags, expectedShortName, expectedLongName, \
1836 expectedPlayerData, expectedPlayerDataSize )
1838 const WCHAR *expectedShortName,
const WCHAR *expectedLongName,
1839 void *expectedPlayerData,
DWORD expectedPlayerDataSize )
1841#include "pshpack1.h"
1848 DWORD expectedShortNameSize;
1849 DWORD expectedLongNameSize;
1850 WCHAR shortName[ 256 ];
1851 BYTE playerData[ 256 ];
1852 WCHAR longName[ 256 ];
1853 unsigned short port;
1860 expectedShortNameSize = expectedShortName ? (
lstrlenW( expectedShortName ) + 1) *
sizeof(
WCHAR ) : 0;
1861 expectedLongNameSize = expectedLongName ? (
lstrlenW( expectedLongName ) + 1) *
sizeof(
WCHAR ) : 0;
1862 expectedSize =
sizeof(
request ) + expectedShortNameSize + expectedLongNameSize +
sizeof( spData )
1863 + expectedPlayerDataSize +
sizeof( reserved1 ) +
sizeof(
reserved2 );
1866 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"recv() returned %d.\n", wsResult );
1871 ok_( __FILE__,
line )(
request.request.playerId == expectedPlayerId,
"got player id %#lx.\n",
1874 ok_( __FILE__,
line )(
request.request.createOffset == 28,
"got create offset %lu.\n",
1875 request.request.createOffset );
1876 ok_( __FILE__,
line )( !
request.request.passwordOffset,
"got password offset %lu.\n",
1877 request.request.passwordOffset );
1879 expectedLongNameSize, expectedPlayerDataSize, 0x12345678 );
1881 if ( expectedShortName )
1885 ok_( __FILE__,
line )( wsResult == expectedShortNameSize,
"recv() returned %d.\n", wsResult );
1886 ok_( __FILE__,
line )( !
lstrcmpW( shortName, expectedShortName ),
"got short name %s.\n",
1890 if ( expectedLongName )
1894 ok_( __FILE__,
line )( wsResult == expectedLongNameSize,
"recv() returned %d.\n", wsResult );
1895 ok_( __FILE__,
line )( !
lstrcmpW( longName, expectedLongName ),
"got long name %s.\n",
1900 ok_( __FILE__,
line )( wsResult ==
sizeof( spData ),
"recv() returned %d.\n", wsResult );
1903 if ( expectedPlayerDataSize )
1907 ok_( __FILE__,
line )( wsResult == expectedPlayerDataSize,
"recv() returned %d.\n", wsResult );
1908 ok_( __FILE__,
line )( !
memcmp( playerData, expectedPlayerData, expectedPlayerDataSize ),
1909 "player data didn't match.\n" );
1914 ok_( __FILE__,
line )( wsResult ==
sizeof( reserved1 ),
"recv() returned %d.\n", wsResult );
1915 ok_( __FILE__,
line )( !reserved1,
"got reserved1 %d.\n", reserved1 );
1919 ok_( __FILE__,
line )( wsResult ==
sizeof(
reserved2 ),
"recv() returned %d.\n", wsResult );
1925#define sendCreatePlayer( sock, tcpPort, udpPort, shortName, longName, playerData, playerDataSize ) \
1926 sendCreatePlayer_( __LINE__, sock, tcpPort, udpPort, shortName, longName, playerData, playerDataSize )
1928 const WCHAR *shortName,
const WCHAR *longName,
void *playerData,
DWORD playerDataSize )
1930#include "pshpack1.h"
1939 .mixed = 0xfab00000,
1943 .sin_port =
htons( tcpPort ),
1950 .magic = 0x79616c70,
1955 .playerId = 0x07734,
1958 .passwordOffset = 0,
1961 .size =
sizeof(
request.request.playerInfo ) +
sizeof(
SpData ),
1964 .shortNameLength = 0,
1965 .longNameLength = 0,
1966 .spDataSize =
sizeof(
SpData ),
1967 .playerDataSize = 0,
1969 .systemPlayerId = 0x51573,
1971 .playerVersion = 14,
1979 .tcpAddr.sin_port =
htons( tcpPort ),
1980 .udpAddr.sin_family =
AF_INET,
1981 .udpAddr.sin_port =
htons( udpPort ),
1984 DWORD shortNameSize = 0;
1985 DWORD longNameSize = 0;
1989 shortNameSize = (
wcslen( shortName ) + 1) *
sizeof(
WCHAR );
1992 longNameSize = (
wcslen( longName ) + 1) *
sizeof(
WCHAR );
1994 request.spHeader.mixed +=
sizeof(
request ) + shortNameSize + longNameSize +
sizeof( spData )
1995 + playerDataSize +
sizeof(
reserved );
1996 request.request.playerInfo.size += shortNameSize + longNameSize + playerDataSize;
1997 request.request.playerInfo.shortNameLength = shortNameSize;
1998 request.request.playerInfo.longNameLength = longNameSize;
1999 request.request.playerInfo.playerDataSize = playerDataSize;
2002 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"send() returned %d.\n", wsResult );
2006 wsResult =
send(
sock, (
char *) shortName, shortNameSize, 0 );
2007 ok_( __FILE__,
line )( wsResult == shortNameSize,
"send() returned %d.\n", wsResult );
2012 wsResult =
send(
sock, (
char *) longName, longNameSize, 0 );
2013 ok_( __FILE__,
line )( wsResult == longNameSize,
"send() returned %d.\n", wsResult );
2016 wsResult =
send(
sock, (
char *) &spData,
sizeof( spData ), 0 );
2017 ok_( __FILE__,
line )( wsResult ==
sizeof( spData ),
"send() returned %d.\n", wsResult );
2021 wsResult =
send(
sock, playerData, playerDataSize, 0 );
2022 ok_( __FILE__,
line )( wsResult == playerDataSize,
"send() returned %d.\n", wsResult );
2026 ok_( __FILE__,
line )( wsResult ==
sizeof(
reserved ),
"send() returned %d.\n", wsResult );
2029#define receiveGuaranteedGameMessage( sock, expectedFromId, expectedToId, expectedData, expectedDataSize ) \
2030 receiveGuaranteedGameMessage_( __LINE__, sock, expectedFromId, expectedToId, expectedData, expectedDataSize )
2032 void *expectedData,
DWORD expectedDataSize )
2034#include "pshpack1.h"
2042 unsigned short port;
2045 DWORD expectedSize =
sizeof(
request.spHeader ) +
sizeof(
request.request ) + expectedDataSize;
2048 ok_( __FILE__,
line )( wsResult == expectedSize,
"recv() returned %d.\n", wsResult );
2052 ok_( __FILE__,
line )( !
memcmp( &
request.data, expectedData, expectedDataSize ),
"message data didn't match.\n" );
2057#define receiveGameMessage( sock, expectedFromId, expectedToId, expectedData, expectedDataSize ) \
2058 receiveGameMessage_( __LINE__, sock, expectedFromId, expectedToId, expectedData, expectedDataSize )
2060 DWORD expectedDataSize )
2062#include "pshpack1.h"
2071 DWORD expectedSize =
sizeof(
request.request ) + expectedDataSize;
2074 ok_( __FILE__,
line )( wsResult == expectedSize,
"recv() returned %d.\n", wsResult );
2077 ok_( __FILE__,
line )( !
memcmp( &
request.data, expectedData, expectedDataSize ),
"message data didn't match.\n" );
2080#define sendGuaranteedGameMessage( sock, port, fromId, toId, data, dataSize ) \
2081 sendGuaranteedGameMessage_( __LINE__, sock, port, fromId, toId, data, dataSize )
2085#include "pshpack1.h"
2111 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"send() returned %d.\n", wsResult );
2114 ok_( __FILE__,
line )( wsResult ==
dataSize,
"send() returned %d.\n", wsResult );
2117#define sendGameMessage( sock, fromId, toId, data, dataSize ) \
2118 sendGameMessage_( __LINE__, sock, fromId, toId, data, dataSize )
2121#include "pshpack1.h"
2143 ok_( __FILE__,
line )( wsResult ==
size,
"send() returned %d.\n", wsResult );
2146#define sendPing( sock, port, fromId, tickCount ) \
2147 sendPing_( __LINE__, sock, port, fromId, tickCount )
2150#include "pshpack1.h"
2159 .mixed = 0xfab00000 +
sizeof(
request ),
2170 .magic = 0x79616c70,
2175 .tickCount = tickCount,
2182 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"send() returned %d.\n", wsResult );
2185#define receivePingReply( sock, expectedFromId, expectedTickCount ) \
2186 receivePingReply_( __LINE__, sock, expectedFromId, expectedTickCount )
2189#include "pshpack1.h"
2196 unsigned short port;
2200 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"recv() returned %d.\n", wsResult );
2204 ok_( __FILE__,
line )(
request.request.fromId == expectedFromId,
"got source id %#lx.\n",
request.request.fromId );
2205 ok_( __FILE__,
line )(
request.request.tickCount == expectedTickCount,
"got tick count %#lx.\n",
2211#define receiveAddPlayerToGroup( sock, expectedPlayerId, expectedGroupId ) \
2212 receiveAddPlayerToGroup_( __LINE__, sock, expectedPlayerId, expectedGroupId )
2215#include "pshpack1.h"
2222 unsigned short port;
2226 ok_( __FILE__,
line )( wsResult ==
sizeof(
request ),
"recv() returned %d.\n", wsResult );
2232 ok_( __FILE__,
line )(
request.request.playerId == expectedPlayerId,
"got player id %#lx.\n",
2234 ok_( __FILE__,
line )(
request.request.groupId == expectedGroupId,
"got group id %#lx.\n",
2236 ok_( __FILE__,
line )( !
request.request.createOffset,
"got create offset %lu.\n",
request.request.createOffset );
2237 ok_( __FILE__,
line )( !
request.request.passwordOffset,
"got password offset %lu.\n",
request.request.passwordOffset );
2242#define sendGroupDataChanged( sock, port, groupId, data, dataSize ) \
2243 sendGroupDataChanged_( __LINE__, sock, port, groupId, data, dataSize )
2246#include "pshpack1.h"
2256 .mixed = 0xfab00000 +
sizeof(
request ),
2267 .magic = 0x79616c70,
2274 .dataOffset =
sizeof(
request.request ),
2285 ok_( __FILE__,
line )( wsResult ==
size,
"send() returned %d.\n", wsResult );
2293 DWORD dwAddressSize = 0;
2294 IDirectPlayLobby3 *pDPL;
2298 &IID_IDirectPlayLobby3A, (
LPVOID*) &pDPL );
2299 ok (
SUCCEEDED (
hr),
"CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed\n");
2303 addressElements[0].
guidDataType = DPAID_ServiceProvider;
2310 addressElements[1].
lpData = (
LPVOID) strIPAddressString;
2322 NULL, &dwAddressSize );
2327 pAddress =
calloc( 1, dwAddressSize );
2329 pAddress, &dwAddressSize );
2345 IDirectPlay4 *pDP = lpContext;
2391 hr = pDirectPlayCreate( (
LPGUID) &DPSPGUID_TCPIP, &pDP,
NULL );
2402 if (!prov)
return TRUE;
2421 if (!prov)
return TRUE;
2448 ok(
FAILED(
hr),
"DirectPlayEnumerateA expected to fail\n");
2453 ok(
FAILED(
hr),
"DirectPlayEnumerateA expected to fail\n");
2458 ok(
arg.call_count > 0,
"Expected at least one valid provider\n");
2459 trace(
"Found %d providers\n",
arg.call_count);
2462 for(
i = 0;
i <
arg.call_count;
i++)
2471 ok(
arg.call_count == 1,
"Expected 1, got %d\n",
arg.call_count);
2478 ok(
FAILED(
hr),
"DirectPlayEnumerateW expected to fail\n");
2483 ok(
FAILED(
hr),
"DirectPlayEnumerateW expected to fail\n");
2490 ok(
arg.call_count > 0,
"Expected at least one valid provider\n");
2493 for(
i = 0;
i <
arg.call_count;
i++)
2502 ok(
arg.call_count == 1,
"Expected 1, got %d\n",
arg.call_count);
2515 &DPAID_ServiceProvider,
2518 static REFGUID sps[] = { &DPSPGUID_SERIAL, &DPSPGUID_MODEM,
2519 &DPSPGUID_IPX, &DPSPGUID_TCPIP };
2545 DWORD dwConnectionSize,
2552 IDirectPlayLobby *pDPL;
2565 &IID_IDirectPlayLobby3A, (
LPVOID*) &pDPL );
2566 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed\n");
2572 dwConnectionSize, callbackData );
2591 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
2593 ok (
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n");
2599 &callbackData, callbackData.
dwFlags );
2606 &callbackData, callbackData.
dwFlags );
2613 &callbackData, callbackData.
dwFlags );
2622 &callbackData, callbackData.
dwFlags );
2629 &callbackData, callbackData.
dwFlags );
2637 &callbackData, callbackData.
dwFlags );
2645 &callbackData, callbackData.
dwFlags );
2657 DWORD dwConnectionSize,
2662 IDirectPlay4 *pDP = lpContext;
2692 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
2694 ok (
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n");
2714 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
2715 ok (
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n");
2773 else if (
IsEqualGUID(guidDataType, &DPAID_ServiceProvider))
2789 DWORD dwAddressSize = 0;
2790 IDirectPlayLobby3 *pDPL;
2794 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
2795 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
2800 &IID_IDirectPlayLobby3A, (
LPVOID*) &pDPL );
2801 ok (
SUCCEEDED (
hr),
"CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed\n");
2804 addressElements[0].
guidDataType = DPAID_ServiceProvider;
2806 addressElements[0].
lpData = (
void*) &DPSPGUID_TCPIP;
2817 pAddress =
calloc( 1, dwAddressSize );
2819 pAddress, &dwAddressSize );
2849 IDirectPlayLobby3 *pDPL;
2852 &IID_IDirectPlayLobby3A, (
LPVOID*) &pDPL );
2853 ok (
SUCCEEDED (
hr),
"CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed\n");
2871 IDirectPlay4 *pDP = lpContext;
2936 for (
i = 0;
i <
data->expectedPlayerCount; ++
i )
2941 BYTE playerData[ 256 ];
2942 DWORD playerDataSize;
2943 BYTE nameData[ 256 ];
2950 ok_( __FILE__,
data->line )( 0,
"duplicate player dpid %#lx.\n", dpid );
2960 ok_( __FILE__,
data->line )( !
name->lpszShortNameA,
"got short name %s.\n",
2970 ok_( __FILE__,
data->line )( !
name->lpszLongNameA,
"got long name %s.\n",
2975 memset( &playerData, 0xcc,
sizeof( playerData ) );
2976 playerDataSize =
sizeof( playerData );
2981 ok_( __FILE__,
data->line )(
hr ==
DP_OK,
"GetPlayerData() returned %#lx.\n",
hr );
2983 "got player data size %lu.\n", playerDataSize );
2985 "player data doesn't match.\n" );
2987 memset( &nameData, 0xcc,
sizeof( nameData ) );
2988 nameDataSize =
sizeof( nameData );
2993 ok_( __FILE__,
data->line )(
hr ==
DP_OK,
"GetPlayerName() returned %#lx.\n",
hr );
2995 "got name size %lu.\n", ((
DPNAME *) nameData)->
dwSize );
2996 ok_( __FILE__,
data->line )( !((
DPNAME *) nameData)->dwFlags,
"got name flags %#lx.\n",
2997 ((
DPNAME *) nameData)->dwFlags );
2998 shortName = ((
DPNAME *) nameData)->lpszShortNameA;
3001 if ( (
char *) nameData <= shortName && shortName < (
char *) nameData + nameDataSize )
3008 ok_( __FILE__,
data->line)( 0,
"got short name %p.\n", shortName );
3015 longName = ((
DPNAME *) nameData)->lpszLongNameA;
3018 if ( (
char *) nameData <= longName && longName < (
char *) nameData + nameDataSize )
3025 ok_( __FILE__,
data->line)( 0,
"got long name %p.\n", longName );
3034 ++
data->actualPlayerCount;
3040 if ( !
data->ignoreUnexpected )
3041 ok_( __FILE__,
data->line )( 0,
"unexpected player dpid %#lx.\n", dpid );
3043 ++
data->actualPlayerCount;
3048#define checkPlayerList( dp, expectedPlayers, expectedPlayerCount ) \
3049 checkPlayerList_( __LINE__, dp, expectedPlayers, expectedPlayerCount )
3055 .expectedPlayers = expectedPlayers,
3056 .expectedPlayerCount = expectedPlayerCount,
3061 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumPlayers() returned %#lx.\n",
hr );
3064 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumPlayers() returned %#lx.\n",
hr );
3066 ok_( __FILE__,
line )(
data.actualPlayerCount ==
data.expectedPlayerCount,
"got player count %d.\n",
3067 data.actualPlayerCount );
3070#define checkGroupPlayerList( dp, group, expectedPlayers, expectedPlayerCount ) \
3071 checkGroupPlayerList_( __LINE__, dp, group, expectedPlayers, expectedPlayerCount )
3073 int expectedPlayerCount )
3078 .expectedPlayers = expectedPlayers,
3079 .expectedPlayerCount = expectedPlayerCount,
3084 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumGroupPlayers() returned %#lx.\n",
hr );
3087 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumGroupPlayers() returned %#lx.\n",
hr );
3089 ok_( __FILE__,
line )(
data.actualPlayerCount ==
data.expectedPlayerCount,
"got player count %d.\n",
3090 data.actualPlayerCount );
3093#define checkGroupList( dp, expectedGroups, expectedGroupCount ) \
3094 checkGroupList_( __LINE__, dp, expectedGroups, expectedGroupCount )
3100 .expectedPlayers = expectedGroups,
3101 .expectedPlayerCount = expectedGroupCount,
3111 ok_( __FILE__,
line )(
data.actualPlayerCount ==
data.expectedPlayerCount,
"got group count %d.\n",
3112 data.actualPlayerCount );
3115#define checkPlayerExists( dp, expectedDpid, expectedPlayerType, expectedShortName, expectedLongName, expectedFlags, \
3116 expectedPlayerData, expectedPlayerDataSize ) \
3117 checkPlayerExists_( __LINE__, dp, expectedDpid, expectedPlayerType, expectedShortName, expectedLongName, \
3118 expectedFlags, expectedPlayerData, expectedPlayerDataSize )
3120 const char *expectedShortName,
const char *expectedLongName,
DWORD expectedFlags,
3121 BYTE *expectedPlayerData,
DWORD expectedPlayerDataSize )
3126 .expectedPlayerType = expectedPlayerType,
3127 .expectedShortName = expectedShortName,
3128 .expectedLongName = expectedLongName,
3129 .expectedFlags = expectedFlags,
3130 .expectedPlayerData = expectedPlayerData,
3131 .expectedPlayerDataSize = expectedPlayerDataSize,
3137 .expectedPlayers = &expectedPlayer,
3138 .expectedPlayerCount = 1,
3139 .ignoreUnexpected =
TRUE,
3144 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumPlayers() returned %#lx.\n",
hr );
3147 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumPlayers() returned %#lx.\n",
hr );
3152#define check_Open( dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, listenPort, expectedPassword, \
3153 idReplyHr, addForwardReplyHr, expectedHr ) \
3154 check_Open_( __LINE__, dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, listenPort, expectedPassword, \
3155 idReplyHr, addForwardReplyHr, expectedHr )
3157 BOOL idRequestExpected,
BOOL forwardRequestExpected,
unsigned short listenPort,
3170 ok_( __FILE__,
line )( !wsResult,
"WSAStartup() returned %d.\n", wsResult );
3176 if ( idRequestExpected )
3178 unsigned short port;
3189 if ( forwardRequestExpected )
3193 if ( addForwardReplyHr ==
DP_OK )
3199 ok_( __FILE__,
line )(
hr == expectedHr,
"Open() returned %#lx.\n",
hr );
3205 BYTE expectedPlayerData[] = { 1, 2, 3, 4, };
3210 .expectedShortName =
"short name",
3211 .expectedLongName =
"long name",
3213 .expectedPlayerData = expectedPlayerData,
3214 .expectedPlayerDataSize =
sizeof( expectedPlayerData ),
3217 .expectedDpid = 0xd00de,
3227 .expectedShortName =
"short name",
3228 .expectedLongName =
"long name",
3230 .expectedPlayerData = expectedPlayerData,
3231 .expectedPlayerDataSize =
sizeof( expectedPlayerData ),
3254 ok_( __FILE__,
line )(
hr == expectedHr,
"Open() returned %#lx.\n",
hr );
3262 ok_( __FILE__,
line )(
hr == expectedHr,
"Open() returned %#lx.\n",
hr );
3295 .guidInstance = appGuid,
3296 .guidApplication = appGuid,
3301 .guidApplication = appGuid,
3302 .guidInstance = appGuid,
3304 .lpszSessionName = (
WCHAR *)
L"normal",
3305 .dwReserved1 = 0xaabbccdd,
3311 .guidApplication = appGuid,
3312 .guidInstance = appGuid,
3314 .lpszSessionName = (
WCHAR *)
L"protected",
3315 .lpszPassword = (
WCHAR *)
L"hadouken",
3316 .dwReserved1 = 0xaabbccdd,
3321 unsigned short port;
3328 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
3360 for ( tryIndex = 0; ; ++tryIndex )
3372 replyDpsd = normalDpsd;
3381 if ( tryIndex < 19 &&
count < 2 )
3396 replyDpsd = normalDpsd;
3401 for ( tryIndex = 0; ; ++tryIndex )
3419 if ( tryIndex < 19 &&
count < 1 )
3444 IDirectPlay4 *pDP, *pDP_server;
3450 &IID_IDirectPlay4A, (
LPVOID*) &pDP_server );
3451 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
3455 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
3456 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
3570#define joinSession( dp, dpsd, serverDpsd, sendSock, recvSock, udpPort ) \
3571 joinSession_( __LINE__, dp, dpsd, serverDpsd, sendSock, recvSock, udpPort )
3573 SOCKET *sendSock,
SOCKET *recvSock,
unsigned short *udpPort )
3577 unsigned short port;
3587 for ( tryIndex = 0; ; ++tryIndex )
3600 ok_( __FILE__,
line )(
hr ==
DP_OK,
"EnumSessions() returned %#lx.\n",
hr );
3602 if ( tryIndex < 19 &&
count < 1 )
3635 .guidInstance = appGuid,
3636 .guidApplication = appGuid,
3641 .guidApplication = appGuid,
3642 .guidInstance = appGuid,
3643 .lpszSessionName = (
WCHAR *)
L"normal",
3644 .dwReserved1 = 0xaabbccdd,
3651 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
3656 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
3711 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
3712 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
3759 ++
data->timeoutCount;
3764 ++
data->actualCount;
3766 for (
i = 0;
i <
data->expectedCount; ++
i )
3768 expectedSession = &
data->expectedSessions[
i ];
3772 ok_( __FILE__,
data->line )( !expectedSession->
actualCount,
"duplicate session %s.\n",
3782 "got current player count %lu.\n", thisSd->
dwMaxPlayers );
3812#define check_EnumSessions( dp, dpsd, flags, expectedHr, expectedSessionCount, timeoutExpected, \
3813 requestExpected, expectedPassword, replyCount, ansi, hrTodo ) \
3814 check_EnumSessions_( __LINE__, dp, dpsd, flags, expectedHr, expectedSessionCount, timeoutExpected, \
3815 requestExpected, expectedPassword, replyCount, ansi, hrTodo )
3817 DWORD expectedSessionCount,
BOOL timeoutExpected,
BOOL requestExpected,
3825 .guidInstance = appGuid,
3826 .guidApplication = appGuid,
3828 .dwCurrentPlayers = 0,
3829 .lpszSessionName = (
WCHAR *)
L"normal",
3830 .dwReserved1 = 0x11223344,
3840 .guidInstance = appGuid2,
3841 .guidApplication = appGuid2,
3843 .dwCurrentPlayers = 10,
3844 .lpszSessionName = (
WCHAR *)
L"private",
3845 .dwReserved1 = 0xaabbccdd,
3856 unsigned short port = 0;
3866 ok_( __FILE__,
line )( !wsResult,
"WSAStartup() returned %d.\n", wsResult );
3870 for ( tryIndex = 0; ; ++tryIndex )
3872 memset( &expectedSessions, 0,
sizeof( expectedSessions ) );
3873 expectedSessions[ 0 ].
dpsd = replyDpsds [ 0 ];
3875 expectedSessions[ 1 ].
dpsd = replyDpsds [ 1 ];
3878 memset( &callbackData, 0,
sizeof( callbackData ) );
3886 if ( requestExpected )
3889 for (
i = 0;
i < replyCount; ++
i )
3910 ok_( __FILE__,
line )( !!callbackData.
timeoutCount == timeoutExpected,
"got timeout count %d.\n",
3920#define check_EnumSessions_async( dpsd, dp, ansi ) check_EnumSessions_async_( __LINE__, dpsd, dp, ansi )
3928 .guidInstance = appGuid,
3929 .guidApplication = appGuid,
3931 .dwCurrentPlayers = 0,
3932 .lpszSessionName = (
WCHAR *)
L"normal",
3933 .dwReserved1 = 0x11223344,
3943 .guidInstance = appGuid2,
3944 .guidApplication = appGuid2,
3946 .dwCurrentPlayers = 10,
3947 .lpszSessionName = (
WCHAR *)
L"private",
3948 .dwReserved1 = 0xaabbccdd,
3959 unsigned short port;
3968 for ( tryIndex = 0; ; ++tryIndex )
3970 memset( expectedSessions, 0,
sizeof( expectedSessions ) );
3971 expectedSessions[ 0 ].
dpsd = replyDpsds [ 0 ];
3974 memset( &callbackData, 0,
sizeof( callbackData ) );
4009 memset( expectedSessions, 0,
sizeof( expectedSessions ) );
4010 expectedSessions[ 0 ].
dpsd = replyDpsds [ 0 ];
4013 memset( &callbackData, 0,
sizeof( callbackData ) );
4032 for (
i = 0;
i < 2; ++
i )
4046 for ( tryIndex = 0; ; ++tryIndex )
4048 memset( expectedSessions, 0,
sizeof( expectedSessions ) );
4049 expectedSessions[ 0 ].
dpsd = replyDpsds [ 0 ];
4051 expectedSessions[ 1 ].
dpsd = replyDpsds [ 1 ];
4054 memset( &callbackData, 0,
sizeof( callbackData ) );
4075 memset( &callbackData, 0,
sizeof( callbackData ) );
4097 .guidApplication = appGuid,
4098 .guidInstance = appGuid,
4105 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dpA );
4111 check_EnumSessions( dpA, &appGuidDpsd, 0,
DPERR_UNINITIALIZED, 0,
FALSE,
FALSE,
NULL, 0,
TRUE,
FALSE );
4112 check_EnumSessions( dp, &appGuidDpsd, 0,
DPERR_UNINITIALIZED, 0,
FALSE,
FALSE,
NULL, 0,
FALSE,
FALSE );
4119 check_EnumSessions( dpA, &dpsd, 0,
DPERR_INVALIDPARAMS, 0,
FALSE,
FALSE,
NULL, 0,
TRUE,
FALSE );
4120 check_EnumSessions( dp, &dpsd, 0,
DPERR_INVALIDPARAMS, 0,
FALSE,
FALSE,
NULL, 0,
FALSE,
FALSE );
4123 check_EnumSessions( dpA, &appGuidDpsd, 0,
DP_OK, 0,
TRUE,
TRUE,
NULL, 0,
TRUE,
FALSE );
4124 check_EnumSessions( dp, &appGuidDpsd, 0,
DP_OK, 0,
TRUE,
TRUE,
NULL, 0,
FALSE,
FALSE );
4127 check_EnumSessions( dpA, &appGuidDpsd, -1,
DPERR_INVALIDPARAMS, 0,
FALSE,
FALSE,
NULL, 0,
TRUE,
TRUE );
4128 check_EnumSessions( dp, &appGuidDpsd, -1,
DPERR_INVALIDPARAMS, 0,
FALSE,
FALSE,
NULL, 0,
FALSE,
TRUE );
4129 check_EnumSessions( dpA,
NULL, 0,
DPERR_INVALIDPARAMS, 0,
FALSE,
FALSE,
NULL, 0,
TRUE,
FALSE );
4130 check_EnumSessions( dp,
NULL, 0,
DPERR_INVALIDPARAMS, 0,
FALSE,
FALSE,
NULL, 0,
FALSE,
FALSE );
4133 check_EnumSessions( dpA, &appGuidDpsd, 0,
DP_OK, 2,
TRUE,
TRUE,
NULL, 2,
TRUE,
FALSE );
4134 check_EnumSessions( dp, &appGuidDpsd, 0,
DP_OK, 2,
TRUE,
TRUE,
NULL, 2,
FALSE,
FALSE );
4135 check_EnumSessions( dpA, &appGuidDpsd,
DPENUMSESSIONS_AVAILABLE,
DP_OK, 2,
TRUE,
TRUE,
NULL, 2,
TRUE,
FALSE );
4136 check_EnumSessions( dp, &appGuidDpsd,
DPENUMSESSIONS_AVAILABLE,
DP_OK, 2,
TRUE,
TRUE,
NULL, 2,
FALSE,
FALSE );
4145 check_EnumSessions( dpA, &dpsd, 0,
DP_OK, 2,
TRUE,
TRUE,
L"password", 2,
TRUE,
FALSE );
4148 check_EnumSessions( dp, &dpsd, 0,
DP_OK, 2,
TRUE,
TRUE,
L"password", 2,
FALSE,
FALSE );
4167 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
4168 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
4256 if (!pDPserver[
i])
return;
4263 &callbackData, -1 );
4278 &callbackData, callbackData.
dwFlags );
4287 &callbackData, callbackData.
dwFlags );
4295 &callbackData, callbackData.
dwFlags );
4303 &callbackData, callbackData.
dwFlags );
4311 &callbackData, callbackData.
dwFlags );
4320 &callbackData, callbackData.
dwFlags );
4328 &callbackData, callbackData.
dwFlags );
4335 &callbackData, callbackData.
dwFlags );
4344 &callbackData, callbackData.
dwFlags );
4351 &callbackData, callbackData.
dwFlags );
4374 &callbackData, callbackData.
dwFlags );
4381 &callbackData, callbackData.
dwFlags );
4387 for (
i=4;
i<=5;
i++)
4394 for (
i=4;
i<=5;
i++)
4402 &callbackData, callbackData.
dwFlags );
4408 for (
i=4;
i<=5;
i++)
4415 for (
i=4;
i<=5;
i++)
4423 &callbackData, callbackData.
dwFlags );
4430 &callbackData, callbackData.
dwFlags );
4439 &callbackData, callbackData.
dwFlags );
4446 &callbackData, callbackData.
dwFlags );
4454 &callbackData, callbackData.
dwFlags );
4463 &callbackData, callbackData.
dwFlags );
4472 for (
i=4;
i<=5;
i++)
4484 for (
i=4;
i<=5;
i++)
4494 &callbackData, callbackData.
dwFlags );
4501 &callbackData, callbackData.
dwFlags );
4511 &callbackData, callbackData.
dwFlags );
4515 for (
i=4;
i<=5;
i++)
4529 IDirectPlay4 *pDP[2];
4543 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
4544 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
4591 lpData[
i] =
calloc( 1, 1024 );
4593 lpDataMsg =
calloc( 1, 1024 );
4609 check( -1, dwDataSize );
4635 checkGuid( &appGuid, &lpData[
i]->guidApplication );
4639 checkGuid( &lpData[0]->guidInstance, &lpData[1]->guidInstance );
4684 checkGuid( &appGuid, &lpData[0]->guidApplication );
4685 checkGuid( &lpData[1]->guidInstance, &lpData[0]->guidInstance );
4708#define checkCreatePlayerOrGroupMessage( dp, expectedType, expectedDpid, expectedCurrentPlayers, expectedPlayerData, \
4709 expectedPlayerDataSize, expectedShortName, expectedLongName, expectedParent, \
4711 checkCreatePlayerOrGroupMessage_( __LINE__, dp, expectedType, expectedDpid, expectedCurrentPlayers, \
4712 expectedPlayerData, expectedPlayerDataSize, expectedShortName, \
4713 expectedLongName, expectedParent, expectedFlags )
4715 DWORD expectedCurrentPlayers,
void *expectedPlayerData,
4716 DWORD expectedPlayerDataSize,
const char *expectedShortName,
4717 const char *expectedLongName,
DPID expectedParent,
DWORD expectedFlags )
4720 DWORD expectedShortNameSize;
4721 DWORD expectedLongNameSize;
4722 DWORD expectedMsgDataSize;
4729 msgDataSize =
sizeof(
msgData );
4730 fromId = 0xdeadbeef;
4738 ok_( __FILE__,
line )(
msg->dwPlayerType == expectedType,
"got player type %#lx.\n",
msg->dwPlayerType );
4739 ok_( __FILE__,
line )(
msg->dpId == expectedDpid,
"got id %#lx.\n",
msg->dpId );
4740 ok_( __FILE__,
line )(
msg->dwCurrentPlayers == expectedCurrentPlayers,
"got current players %lu.\n",
4741 msg->dwCurrentPlayers );
4742 ok_( __FILE__,
line )(
msg->dwDataSize == expectedPlayerDataSize,
"got player data size %lu.\n",
msg->dwDataSize );
4743 if ( expectedPlayerData )
4745 ok_( __FILE__,
line )(
msg->lpData && !
memcmp(
msg->lpData, expectedPlayerData, expectedPlayerDataSize ),
4746 "player data didn't match.\n" );
4750 ok_( __FILE__,
line )( !
msg->lpData,
"got player data %p.\n",
msg->lpData );
4752 ok_( __FILE__,
line )(
msg->dpnName.dwSize ==
sizeof(
DPNAME ),
"got name size %lu.\n",
msg->dpnName.dwSize );
4753 ok_( __FILE__,
line )( !
msg->dpnName.dwFlags,
"got name flags %#lx.\n",
msg->dpnName.dwFlags );
4754 if ( expectedShortName )
4756 ok_( __FILE__,
line )(
msg->dpnName.lpszShortNameA && !
strcmp(
msg->dpnName.lpszShortNameA, expectedShortName ),
4761 ok_( __FILE__,
line )( !
msg->dpnName.lpszShortNameA,
"got short name %s.\n",
4764 if ( expectedLongName )
4766 ok_( __FILE__,
line )(
msg->dpnName.lpszLongNameA && !
strcmp(
msg->dpnName.lpszLongNameA, expectedLongName ),
4771 ok_( __FILE__,
line )( !
msg->dpnName.lpszLongNameA,
"got long name %s.\n",
4774 ok_( __FILE__,
line )(
msg->dpIdParent == expectedParent,
"got parent id %#lx.\n",
msg->dpIdParent );
4775 ok_( __FILE__,
line )(
msg->dwFlags == expectedFlags,
"got flags %#lx.\n",
msg->dwFlags );
4777 expectedShortNameSize = expectedShortName ?
strlen( expectedShortName ) + 1 : 0;
4778 expectedLongNameSize = expectedLongName ?
strlen( expectedLongName ) + 1 : 0;
4780 + expectedPlayerDataSize;
4782 ok_( __FILE__,
line )( msgDataSize == expectedMsgDataSize,
"got message size %lu.\n", msgDataSize );
4787#define checkPlayerMessage( dp, expectedFromId, expectedData, expectedDataSize ) \
4788 checkPlayerMessage_( __LINE__, dp, expectedFromId, expectedData, expectedDataSize )
4790 DWORD expectedDataSize )
4797 fromId = 0xdeadbeef;
4804 ok_( __FILE__,
line )( fromId == expectedFromId,
"got source id %#lx.\n", fromId );
4805 ok_( __FILE__,
line )( !
memcmp(
data, expectedData, expectedDataSize ),
"message data didn't match.\n" );
4811#define checkNoMorePlayerMessages( dp ) checkNoMorePlayerMessages_( __LINE__, dp )
4819 msgDataSize =
sizeof(
msgData );
4844#define checkCreatePlayerOrGroupMessages( dp, expectedType, expectedDpid, expectedCurrentPlayers, expectedPlayerData, \
4845 expectedPlayerDataSize, expectedShortName, expectedLongName, expectedParent, \
4847 checkCreatePlayerOrGroupMessages_( __LINE__, dp, expectedType, expectedDpid, expectedCurrentPlayers, \
4848 expectedPlayerData, expectedPlayerDataSize, expectedShortName, \
4849 expectedLongName, expectedParent, expectedFlags )
4851 DWORD expectedCurrentPlayers,
void *expectedPlayerData,
4852 DWORD expectedPlayerDataSize,
const char *expectedShortName,
4853 const char *expectedLongName,
DPID expectedParent,
DWORD expectedFlags )
4864 for (
i = 0;
i <
data.idCount - 1; ++
i )
4867 expectedPlayerData, expectedPlayerDataSize, expectedShortName,
4868 expectedLongName, expectedParent, expectedFlags );
4869 for (
j = 0;
j <
data.idCount; ++
j )
4871 if (
data.ids[
j ] == dpid )
4877 ok_( __FILE__,
line )( dpid && dpid != expectedDpid &&
j <
data.idCount,
"got destination id %#lx.\n", dpid );
4881#define check_CreatePlayer( dp, dpid, name, flags, expectedHr, expectedDpid, recvSock, requestExpected, \
4882 expectedFlags, expectedShortName, expectedShortNameA, expectedLongName, expectedLongNameA, \
4883 expectedCurrentPlayers ) \
4884 check_CreatePlayer_( __LINE__, dp, dpid, name, flags, expectedHr, expectedDpid, recvSock, requestExpected, \
4885 expectedFlags, expectedShortName, expectedShortNameA, expectedLongName, expectedLongNameA, \
4886 expectedCurrentPlayers )
4889 const WCHAR *expectedShortName,
const char *expectedShortNameA,
4890 const WCHAR *expectedLongName,
const char *expectedLongNameA,
4891 DWORD expectedCurrentPlayers )
4893 BYTE playerData[] = { 1, 2, 3, 4, 5, 6, 7, 8, };
4900 if ( requestExpected )
4902 unsigned short port;
4910 playerData,
sizeof( playerData ) );
4913 ok_( __FILE__,
line )(
hr == expectedHr,
"CreatePlayer() returned %#lx.\n",
hr );
4915 ok_( __FILE__,
line )( *dpid == expectedDpid,
"got dpid %#lx.\n", *dpid );
4918 expectedFlags, playerData,
sizeof( playerData ) );
4922 playerData,
sizeof( playerData ), expectedShortNameA, expectedLongNameA,
4932 ok_( __FILE__,
line )(
hr == expectedHr,
"CreatePlayer() returned %#lx.\n",
hr );
4934 ok_( __FILE__,
line )( *dpid == expectedDpid,
"got dpid %#lx.\n", *dpid );
4946 .guidApplication = appGuid,
4947 .guidInstance = appGuid,
4952 .guidApplication = appGuid,
4953 .guidInstance = appGuid,
4954 .lpszSessionName = (
WCHAR *)
L"normal",
4955 .dwReserved1 = 0xaabbccdd,
4959 .dwSize =
sizeof(
DPNAME ),
4960 .lpszShortNameA = (
char *)
"short player name",
4961 .lpszLongNameA = (
char *)
"long player name",
4974 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
4979 check_CreatePlayer( dp, &dpid,
NULL, 0,
DPERR_UNINITIALIZED, 0xdeadbeef,
INVALID_SOCKET,
FALSE, 0,
NULL,
NULL,
4986 check_CreatePlayer( dp, &dpid,
NULL, 0,
DPERR_INVALIDPARAMS, 0xdeadbeef,
INVALID_SOCKET,
FALSE, 0,
NULL,
NULL,
4990 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
4994 check_CreatePlayer( dp, &dpid,
NULL, 0,
DP_OK, 2, recvSock,
TRUE, 0x8,
NULL,
NULL,
NULL,
NULL, 2 );
4997 check_CreatePlayer( dp, &dpid, &
fullName, 0,
DP_OK, 3, recvSock,
TRUE, 0x8,
L"short player name",
4998 "short player name",
L"long player name",
"long player name", 3 );
5003 check_CreatePlayer( dp, &dpid, &
name, 0,
DP_OK, 4, recvSock,
TRUE, 0x8,
L"short player name",
"short player name",
5004 L"long player name",
"long player name", 4 );
5007 check_CreatePlayer( dp, &dpid, &nullName, 0,
DP_OK, 5, recvSock,
TRUE, 0x8,
NULL,
NULL,
NULL,
NULL, 5 );
5011 check_CreatePlayer( dp,
NULL,
NULL, 0,
DPERR_INVALIDPARAMS, 0, recvSock,
FALSE, 0,
NULL,
NULL,
NULL,
NULL, 0 );
5015 check_CreatePlayer( dp, &dpid,
NULL, 0,
DP_OK, 6, recvSock,
TRUE, 0x8,
NULL,
NULL,
NULL,
NULL, 6 );
5018 check_CreatePlayer( dp, &dpid,
NULL,
DPPLAYER_SPECTATOR,
DP_OK, 7, recvSock,
TRUE, 0x208,
NULL,
NULL,
NULL,
NULL,
5030 IDirectPlay4 *pDP[2];
5038 &IID_IDirectPlay4A, (
LPVOID*) &pDP[0] );
5039 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
5043 &IID_IDirectPlay4A, (
LPVOID*) &pDP[1] );
5044 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
5198#define createPlayer( dp, inDpid, event, data, dataSize, flags, sendSock, recvSock ) \
5199 createPlayer_( __LINE__, dp, inDpid, event, data, dataSize, flags, sendSock, recvSock )
5218 ok_( __FILE__,
line )( dpid == inDpid,
"got dpid %#lx.\n", dpid );
5223 BYTE playerData[] = { 4, 3, 2, 1, };
5227 .guidInstance = appGuid,
5228 .guidApplication = appGuid,
5233 .guidApplication = appGuid,
5234 .guidInstance = appGuid,
5235 .lpszSessionName = (
WCHAR *)
L"normal",
5236 .dwReserved1 = 0xaabbccdd,
5248 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
5253 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
5257 sendCreatePlayer( sendSock, 2349, 2399,
L"new player short name",
L"new player long name", playerData,
5258 sizeof( playerData ) );
5261 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
5267 "new player short name",
"new player long name", 0, 0 );
5268 ok( dpid == 0x11223344,
"got destination id %#lx.\n", dpid );
5285 IDirectPlay4 *pDP[2];
5298 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
5299 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
5454 LPCSTR lpDataFake =
"big_fake_data_chunk";
5457 LPCSTR lpData =
"remote_data";
5460 LPCSTR lpDataLocal =
"local_data";
5464 DWORD dwDataSizeGet = dwDataSizeFake;
5468 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
5469 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
5525 dwDataSizeGet = dwDataSizeFake;
5526 strcpy(lpDataGet, lpDataFake);
5528 &dwDataSizeGet, 0 );
5530 check( dwDataSize, dwDataSizeGet );
5534 strcpy(lpDataGet, lpDataFake);
5537 check( dwDataSize, dwDataSizeGet );
5539 strcpy(lpDataGet, lpDataFake);
5542 check( dwDataSize, dwDataSizeGet );
5546 dwDataSizeGet = dwDataSizeFake;
5547 strcpy(lpDataGet, lpDataFake);
5550 check( dwDataSize, dwDataSizeGet );
5554 dwDataSizeGet = dwDataSizeFake;
5555 strcpy(lpDataGet, lpDataFake);
5558 check( dwDataSize, dwDataSizeGet );
5561 dwDataSizeGet = dwDataSizeFake;
5562 strcpy(lpDataGet, lpDataFake);
5566 check( dwDataSize, dwDataSizeGet );
5569 dwDataSizeGet = dwDataSizeFake;
5570 strcpy(lpDataGet, lpDataFake);
5574 check( 0, dwDataSizeGet );
5577 dwDataSizeGet = dwDataSizeFake;
5578 strcpy(lpDataGet, lpDataFake);
5582 check( 0, dwDataSizeGet );
5587 strcpy(lpDataGet, lpDataFake);
5591 check( 0, dwDataSizeGet );
5594 dwDataSizeGet = dwDataSizeFake;
5595 strcpy(lpDataGet, lpDataFake);
5599 check( 0, dwDataSizeGet );
5620 dwDataSizeGet = dwDataSizeFake;
5621 strcpy(lpDataGet, lpDataFake);
5624 check( dwDataSize, dwDataSizeGet );
5627 dwDataSizeGet = dwDataSizeFake;
5628 strcpy(lpDataGet, lpDataFake);
5632 check( dwDataSize, dwDataSizeGet );
5635 dwDataSizeGet = dwDataSizeFake;
5636 strcpy(lpDataGet, lpDataFake);
5640 check( dwDataSizeLocal, dwDataSizeGet );
5641 checkStr( lpDataLocal, lpDataGet );
5643 dwDataSizeGet = dwDataSizeFake;
5644 strcpy(lpDataGet, lpDataFake);
5648 check( dwDataSizeLocal, dwDataSizeGet );
5649 checkStr( lpDataLocal, lpDataGet );
5653 strcpy(lpDataGet, lpDataFake);
5657 check( dwDataSizeLocal, dwDataSizeGet );
5660 dwDataSizeGet = dwDataSizeFake;
5661 strcpy(lpDataGet, lpDataFake);
5665 check( dwDataSizeLocal, dwDataSizeGet );
5680 dwDataSizeLocal, 0 );
5683 dwDataSizeGet = dwDataSizeFake;
5684 strcpy(lpDataGet, lpDataFake);
5687 check( dwDataSizeLocal, dwDataSizeGet );
5688 checkStr( lpDataLocal, lpDataGet );
5695 dwDataSizeGet = dwDataSizeFake + 1;
5696 strcpy(lpDataGet, lpData);
5699 check( dwDataSizeFake, dwDataSizeGet );
5713 IDirectPlay4 *pDP[2];
5720 DWORD dwDataSize = 1024;
5728 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
5729 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
5743 check( 1024, dwDataSize );
5763 check( 1024, dwDataSize );
5785 check( 1024, dwDataSize );
5804 check( 1024, dwDataSize );
5812 check( -1, dwDataSize );
5829 check( 45, dwDataSize );
5839 check( 16, dwDataSize );
5849 check( 16, dwDataSize );
5854 check( 16, dwDataSize );
5858 check( 16, dwDataSize );
5871 check( 45, dwDataSize );
5884 lpData, &dwDataSize );
5886 check( 48, dwDataSize );
5891 lpData, &dwDataSize );
5893 check( 45, dwDataSize );
5905 lpData, &dwDataSize );
5907 check( 50, dwDataSize );
5912 lpData, &dwDataSize );
5914 check( 45, dwDataSize );
5925 lpData, &dwDataSize );
5927 check( 45, dwDataSize );
5938 lpData, &dwDataSize );
5940 check( 47, dwDataSize );
5966 IDirectPlay4 *pDP = lpContext;
5988 NULL, &dpCredentials );
5997 IDirectPlay4 *pDP[2];
6003 DWORD dwDataSize = 1024;
6010 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
6011 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
6054 lpData, &dwDataSize );
6056 check( 1024, dwDataSize );
6087 lpData, &dwDataSize );
6089 check( 1024, dwDataSize );
6094 lpData, &dwDataSize );
6096 check( 1024, dwDataSize );
6100 lpData, &dwDataSize );
6102 check( 1024, dwDataSize );
6107 NULL, &dwDataSize );
6109 check( 0, dwDataSize );
6113 lpData, &dwDataSize );
6115 check( 0, dwDataSize );
6118 lpData, &dwDataSize );
6120 check( 0, dwDataSize );
6125 lpData, &dwDataSize );
6127 check( 1024, dwDataSize );
6145 &DPAID_ServiceProvider,
6148 static DWORD sizes[] = { 4, 16, 12, 24, 4, 16, 10, 20 };
6181 IDirectPlay4 *pDP[2];
6182 IDirectPlayLobby3 *pDPL;
6189 DWORD dwDataSize = 1024;
6196 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
6197 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
6202 &IID_IDirectPlayLobby3A, (
LPVOID*) &pDPL );
6203 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlayLobby / IID_IDirectPlayLobby3A failed\n" );
6224 check( 1024, dwDataSize );
6229 check( 1024, dwDataSize );
6249 lpData, &dwDataSize );
6251 check( 1024, dwDataSize );
6255 lpData, &dwDataSize );
6257 check( 1024, dwDataSize );
6262 NULL, &dwDataSize );
6264 check( 136, dwDataSize );
6268 lpData, &dwDataSize );
6270 check( 136, dwDataSize );
6273 lpData, &dwDataSize );
6275 check( 136, dwDataSize );
6284 lpData, &dwDataSize );
6286 check( 136, dwDataSize );
6297 lpData, &dwDataSize );
6299 check( 130, dwDataSize );
6321 IDirectPlay4 *pDP[2];
6333 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
6334 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
6431 DPID idFrom, idTo, dpid, idGroup, idGroupParent;
6439 DWORD dwDataSizeGet = 1024;
6444 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
6445 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
6503 &groupName,
NULL, 0, 0 );
6507 &groupName,
NULL, 0, 0 );
6516 &groupName,
NULL, 0, 0 );
6520 &groupName,
NULL, 0, 0 );
6527 dwDataSizeGet = 1024;
6533 check( 48, dwDataSizeGet );
6537 check( 48 + dwDataSize, dwDataSizeGet );
6592 dwDataSizeGet = 1024;
6647 dwDataSizeGet = 1024;
6651 check( 48, dwDataSizeGet );
6736 IDirectPlay4 *pDP[2];
6738 DPID dpid[2], idGroup, idOwner;
6746 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
6747 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
6760 check( 0, idOwner );
6831 strlen(
"DPENUMPLAYERS_") ) );
6835 if ( playerIndex <
'5' )
6904 IDirectPlay4 *pDP[3];
6915 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
6916 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
6927 callbackData.
dpid = dpid;
7048 callbackData.
pDP = pDP[2];
7056 callbackData.
pDP = pDP[2];
7101 "GROUP,DPENUMPLAYERS_SPECTATOR:"
7102 "GROUP,DPENUMPLAYERS_SERVERPLAYER:"
7103 "GROUP:ALL:ALL:", callbackData.
szTrace2 );
7113 "LOCAL,DPENUMPLAYERS_SPECTATOR:", callbackData.
szTrace2 );
7162 strlen(
"DPENUMGROUPS_") ) );
7227 IDirectPlay4 *pDP[3];
7238 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
7239 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
7250 callbackData.
dpid = dpid;
7368 callbackData.
pDP = pDP[2];
7375 callbackData.
pDP = pDP[2];
7424 "LOCAL,DPENUMGROUPS_STAGINGAREA:", callbackData.
szTrace2 );
7434 "REMOTE,DPENUMGROUPS_HIDDEN:", callbackData.
szTrace2 );
7454 IDirectPlay4 *pDP[2];
7465 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
7466 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
7476 callbackData.
dpid = dpid;
7548 NULL, &callbackData, 0 );
7587 callbackData.
pDP = pDP[1];
7634 checkStr(
"LOCAL,DPENUMGROUPS_SHORTCUT:"
7635 "LOCAL,DPENUMGROUPS_STAGINGAREA:"
7636 "LOCAL,DPENUMGROUPS_HIDDEN:LOCAL:", callbackData.
szTrace2 );
7657 checkStr(
"REMOTE,DPENUMGROUPS_SHORTCUT:"
7658 "REMOTE,DPENUMGROUPS_STAGINGAREA:"
7659 "REMOTE,DPENUMGROUPS_HIDDEN:REMOTE:", callbackData.
szTrace2 );
7689 IDirectPlay4 *pDP[2];
7691 DPID idPlayer[6], idGroup[3];
7695 DWORD dwDataSize = 1024;
7703 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
7704 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
7763 "S2,S1,S0," "S2,S1,S0,"
7764 "S2,S1,S0," "S2,S1,S0,"
7765 "S2,S1,S0," "S2,S1,S0,", callbackData.
szTrace1 );
7768 "S5,S4,S3," "S5,S4,S3,"
7769 "S5,S4,S3,", callbackData.
szTrace1 );
7802 checkStr(
"S2,S1,S0," "S2,S1,S0," "S2,S1,S0,"
7803 "S2,S1,S0," "S2,S1,S0," "S2,S1,S0,"
7804 "S2,S1,S0,", callbackData.
szTrace1 );
7806 checkStr(
"S5,S4,S3," "S5,S4,S3," "S5,S4,S3,"
7807 "S5,S4,S3," "S5,S4,S3," "S5,S4,S3,"
7808 "S5,S4,S3,", callbackData.
szTrace1 );
7816 lpData, dwDataSize );
7825 lpData, dwDataSize );
7833 lpData, dwDataSize );
7841 lpData, dwDataSize );
7850 lpData, dwDataSize );
7858 lpData, dwDataSize );
7866 lpData, dwDataSize );
7874 lpData, dwDataSize );
7883 lpData, dwDataSize );
7891 lpData, dwDataSize );
7899 lpData, dwDataSize );
7907 lpData, dwDataSize );
7924 IDirectPlay4 *pDP[2];
7926 DPID idPlayer[6], idGroup[3];
7931 DWORD dwDataSize = 1024;
7938 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
7939 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
8008 checkStr(
"S1," "S2,S1," "S3,S2,S1," "S4,S3,S2,S1,"
8009 "S5,S4,S3,S2,S1," "S5,S4,S3,S2,S1,", callbackData.
szTrace1 );
8043 checkStr(
"S5," "S4,S3,S2,S1," "S5,S4,S3,S2,S1,"
8044 "S5,S4,S3,S2,S1," "S5,S4,S3,S2,S1,", callbackData.
szTrace1 );
8051 lpData, dwDataSize );
8060 lpData, dwDataSize );
8068 lpData, dwDataSize );
8076 lpData, dwDataSize );
8085 lpData, dwDataSize );
8093 lpData, dwDataSize );
8101 lpData, dwDataSize );
8109 lpData, dwDataSize );
8118 lpData, dwDataSize );
8126 lpData, dwDataSize );
8134 lpData, dwDataSize );
8142 lpData, dwDataSize );
8163 .guidApplication = appGuid,
8164 .guidInstance = appGuid,
8169 .guidApplication = appGuid,
8170 .guidInstance = appGuid,
8171 .lpszSessionName = (
WCHAR *)
L"normal",
8172 .dwReserved1 = 0xaabbccdd,
8174 BYTE data[] = { 1, 2, 3, 4, 5, 6, 7, 8, };
8182 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
8193 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
8212 ok( dpid == 0x14,
"got destination id %#lx.\n", dpid );
8224 ok( dpid == 0x14,
"got destination id %#lx.\n", dpid );
8248 IDirectPlay4 *pDP[2];
8250 DPID dpid[4], idFrom, idTo;
8255 DWORD dwDataSize = 1024;
8264 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
8265 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
8328 NULL, messageSize );
8350 lpData, &dwDataSize );
8368 lpData, &dwDataSize );
8372 lpData, &dwDataSize );
8393 lpData, &dwDataSize );
8399 lpData, &dwDataSize );
8427 lpData, &dwDataSize );
8528 check( dpid[1], idTo );
8585 .guidApplication = appGuid,
8586 .guidInstance = appGuid,
8591 .guidApplication = appGuid,
8592 .guidInstance = appGuid,
8593 .lpszSessionName = (
WCHAR *)
L"normal",
8594 .dwReserved1 = 0xaabbccdd,
8596 BYTE data0[] = { 1, 2, 3, 4, 5, 6, 7, 8, };
8598 unsigned short udpPort;
8614 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
8617 msgDataSize =
sizeof(
msgData );
8623 msgDataSize =
sizeof(
msgData );
8627 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock, &udpPort );
8633 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8641 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8643 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8645 fromId = 0xdeadbeef;
8647 msgDataSize =
sizeof( data0 ) - 1;
8650 ok( fromId == 0xdeadbeef,
"got source id %#lx.\n", fromId );
8651 ok( toId == 0xdeadbeef,
"got destination id %#lx.\n", toId );
8652 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8654 fromId = 0xdeadbeef;
8656 msgDataSize =
sizeof(
msgData );
8659 ok( fromId == 0xdeadbeef,
"got source id %#lx.\n", fromId );
8660 ok( toId == 0xdeadbeef,
"got destination id %#lx.\n", toId );
8661 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8663 fromId = 0xdeadbeef;
8666 msgDataSize =
sizeof(
msgData );
8669 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8670 ok( toId == 0x07734,
"got destination id %#lx.\n", toId );
8671 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8672 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8674 fromId = 0xdeadbeef;
8677 msgDataSize =
sizeof(
msgData );
8680 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8681 ok( toId == 0x07734,
"got destination id %#lx.\n", toId );
8682 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8683 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8685 fromId = 0xdeadbeef;
8688 msgDataSize =
sizeof(
msgData );
8691 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8692 ok( toId == 0x07734,
"got destination id %#lx.\n", toId );
8693 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8694 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8696 fromId = 0xdeadbeef;
8699 msgDataSize =
sizeof(
msgData );
8702 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8703 ok( toId == 0x14,
"got destination id %#lx.\n", toId );
8705 ok( msgDataSize ==
sizeof(
data1 ),
"got message size %lu.\n", msgDataSize );
8707 msgDataSize =
sizeof(
msgData );
8714 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8718 msgDataSize =
sizeof(
msgData );
8725 msgDataSize =
sizeof(
msgData );
8728 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8729 ok( toId == 0x07734,
"got destination id %#lx.\n", toId );
8730 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8731 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8735 msgDataSize =
sizeof(
msgData );
8742 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8744 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8746 fromId = 0xdeadbeef;
8749 msgDataSize =
sizeof(
msgData );
8752 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8753 ok( toId == 0x07734,
"got destination id %#lx.\n", toId );
8754 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8755 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8758 msgDataSize =
sizeof(
msgData );
8762 fromId = 0xdeadbeef;
8765 msgDataSize =
sizeof(
msgData );
8768 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8769 ok( toId == 0x14,
"got destination id %#lx.\n", toId );
8770 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8771 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8774 msgDataSize =
sizeof(
msgData );
8783 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
8785 fromId = 0xdeadbeef;
8788 msgDataSize =
sizeof(
msgData );
8791 ok( fromId == 0x1337,
"got source id %#lx.\n", fromId );
8792 ok( toId == 0x07734,
"got destination id %#lx.\n", toId );
8793 ok( !
memcmp(
msgData, data0,
sizeof( data0 ) ),
"message data didn't match.\n" );
8794 ok( msgDataSize ==
sizeof( data0 ),
"got message size %lu.\n", msgDataSize );
8796 msgDataSize =
sizeof(
msgData );
8815 DPID dpid[4], idFrom, idTo;
8819 DWORD dwDataSize = 1024;
8829 &IID_IDirectPlay4A, (
LPVOID*) &pDP );
8830 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
8844 lpData, &dwDataSize );
8854 lpData, &dwDataSize );
8861 lpData, &dwDataSize );
8866 NULL, &dwDataSize );
8870 lpData, &dwDataSize );
8897 check( 5, dwCount );
8899 check( 5, dwCount );
8901 check( 3, dwCount );
8903 check( 3, dwCount );
8908 NULL, &dwDataSize );
8910 check( 48, dwDataSize );
8913 lpData, &dwDataSize );
8915 check( 48, dwDataSize );
8919 for (
i=0;
i<11;
i++)
8923 lpData, &dwDataSize );
8931 check( 48, dwDataSize );
8943 check( 52, dwDataSize );
8959 check( dpid[0], idTo );
8968 check( dpid[1], idTo );
8976 check( dpid[0], idTo );
8986 check( dpid[2], idTo );
8994 check( dpid[1], idTo );
9002 check( dpid[0], idTo );
9012 check( dpid[2], idTo );
9019 check( dpid[1], idTo );
9026 check( dpid[0], idTo );
9035 check( dpid[2], idTo );
9043 check( dpid[0], idTo );
9068 for (
i=0;
i<10;
i++)
9071 lpData, &dwDataSize );
9079 check( idFrom, dpid[0] );
9080 check( idTo, dpid[2] );
9097 .guidInstance = appGuid,
9098 .guidApplication = appGuid,
9103 .guidApplication = appGuid,
9104 .guidInstance = appGuid,
9105 .lpszSessionName = (
WCHAR *)
L"normal",
9106 .dwReserved1 = 0xaabbccdd,
9108 unsigned short udpPort;
9116 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
9121 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock, &udpPort );
9125 udpRecvSock =
bindUdp( 2399 );
9127 sendPing( udpSendSock, 2349, 0x51573, 0x44332211 );
9141#define checkAddPlayerToGroupMessage( dp, expectedGroupId, expectedPlayerId ) \
9142 checkAddPlayerToGroupMessage_( __LINE__, dp, expectedGroupId, expectedPlayerId )
9152 msgDataSize =
sizeof(
msgData );
9153 fromId = 0xdeadbeef;
9161 ok_( __FILE__,
line )(
msg->dpIdGroup == expectedGroupId,
"got id %#lx.\n",
msg->dpIdGroup );
9162 ok_( __FILE__,
line )(
msg->dpIdPlayer == expectedPlayerId,
"got id %#lx.\n",
msg->dpIdPlayer );
9172 .guidApplication = appGuid,
9173 .guidInstance = appGuid,
9178 .guidApplication = appGuid,
9179 .guidInstance = appGuid,
9180 .lpszSessionName = (
WCHAR *)
L"normal",
9181 .dwReserved1 = 0xaabbccdd,
9189 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
9197 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
9208 ok( dpid == 0x07734,
"got destination id %#lx.\n", dpid );
9223#define checkSetPlayerOrGroupDataMessage( dp, expectedPlayerType, expectedDpid, expectedData, expectedDataSize ) \
9224 checkSetPlayerOrGroupDataMessage_( __LINE__, dp, expectedPlayerType, expectedDpid, expectedData, expectedDataSize )
9226 void *expectedData,
DWORD expectedDataSize )
9235 msgDataSize =
sizeof(
msgData );
9236 fromId = 0xdeadbeef;
9244 ok_( __FILE__,
line )(
msg->dwPlayerType == expectedPlayerType,
"got player type %#lx.\n",
msg->dwPlayerType );
9245 ok_( __FILE__,
line )(
msg->dpId == expectedDpid,
"got dpid %#lx.\n",
msg->dpId );
9246 ok_( __FILE__,
line )(
msg->dwDataSize == expectedDataSize,
"got player data size %lu.\n",
msg->dwDataSize );
9249 ok_( __FILE__,
line )(
msg->lpData && !
memcmp(
msg->lpData, expectedData, expectedDataSize ),
9250 "data didn't match.\n" );
9254 ok_( __FILE__,
line )( !
msg->lpData,
"got data %p.\n",
msg->lpData );
9262 BYTE expectedGroupData[] = { 8, 7, 6, 5, 4, 3, 2, 1, };
9266 .guidInstance = appGuid,
9267 .guidApplication = appGuid,
9272 .guidApplication = appGuid,
9273 .guidInstance = appGuid,
9274 .lpszSessionName = (
WCHAR *)
L"normal",
9275 .dwReserved1 = 0xaabbccdd,
9277 BYTE groupData[ 256 ];
9278 DWORD groupDataSize;
9289 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dp );
9294 joinSession( dp, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
9301 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
9304 sizeof( expectedGroupData ) );
9305 ok( dpid == 0x11223344,
"got destination id %#lx.\n", dpid );
9307 memset( groupData, 0xcc,
sizeof( groupData ) );
9308 groupDataSize =
sizeof( groupData );
9311 ok( groupDataSize ==
sizeof( expectedGroupData ),
"got group data size %lu.\n", groupDataSize );
9312 ok( !
memcmp( groupData, expectedGroupData,
sizeof( expectedGroupData ) ),
"group data didn't match.\n" );
9329 IDirectPlay4 *pDP[2];
9336 DWORD dwDataSize = 1024;
9344 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
9345 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
9353 check( -1, dwCount );
9369 check( 0, dwCount );
9389 check( -1, dwCount );
9394 check( -1, dwCount );
9399 check( -1, dwCount );
9407 check( 5, dwCount );
9412 check( 1, dwCount );
9417 check( 3, dwCount );
9422 check( 2, dwCount );
9428 check( 0, dwCount );
9433 check( 1, dwCount );
9438 check( 2, dwCount );
9452 check( 0, dwCount );
9457 check( 0, dwCount );
9473 check( 11, dwCount );
9478 check( 7, dwCount );
9483 check( 0, dwCount );
9488 check( 5, dwCount );
9493 check( 6, dwCount );
9498 check( 7, dwCount );
9504 "12,12,12,12,12,12,", callbackData.
szTrace1 );
9513 check( 0, dwCount );
9518 check( 0, dwCount );
9523 check( 0, dwCount );
9528 check( 0, dwCount );
9533 check( 0, dwCount );
9538 check( 0, dwCount );
9551 BYTE playerData[] = { 1, 2, 3, 4, 5, 6, 7, 8, };
9556 .guidApplication = appGuid,
9557 .guidInstance = appGuid,
9562 .guidApplication = appGuid,
9563 .guidInstance = appGuid,
9564 .lpszSessionName = (
WCHAR *)
L"normal",
9565 .dwReserved1 = 0xaabbccdd,
9569 .dwSize =
sizeof(
DPNAME ),
9570 .lpszShortNameA = (
char *)
"short name",
9572 DWORD createPlayerMsgSize;
9587 hr =
CoCreateInstance( &CLSID_DirectPlay,
NULL, CLSCTX_INPROC_SERVER, &IID_IDirectPlay4A, (
void **) &dpA );
9592 msgCount = 0xdeadbeef;
9596 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9601 msgCount = 0xdeadbeef;
9605 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9608 msgCount = 0xdeadbeef;
9612 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9615 msgCount = 0xdeadbeef;
9619 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9622 msgCount = 0xdeadbeef;
9626 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9629 msgCount = 0xdeadbeef;
9633 ok( msgCount == 0,
"got message count %lu.\n", msgCount );
9636 joinSession( dpA, &appGuidDpsd, &serverDpsd, &sendSock, &recvSock,
NULL );
9640 msgCount = 0xdeadbeef;
9644 ok( msgCount == 0,
"got message count %lu.\n", msgCount );
9647 msgCount = 0xdeadbeef;
9651 ok( msgCount == 0,
"got message count %lu.\n", msgCount );
9654 msgCount = 0xdeadbeef;
9658 ok( msgCount == 0,
"got message count %lu.\n", msgCount );
9661 msgCount = 0xdeadbeef;
9665 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9668 msgCount = 0xdeadbeef;
9672 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9675 msgCount = 0xdeadbeef;
9679 ok( msgCount == 0xdeadbeef,
"got message count %lu.\n", msgCount );
9689 ok( dpid == 0x14,
"got dpid %#lx.\n", dpid );
9694 ok( waitResult ==
WAIT_OBJECT_0,
"message wait returned %lu\n", waitResult );
9699 msgCount = 0xdeadbeef;
9703 ok( msgCount == 1,
"got message count %lu.\n", msgCount );
9706 msgCount = 0xdeadbeef;
9710 ok( msgCount == 1,
"got message count %lu.\n", msgCount );
9713 msgCount = 0xdeadbeef;
9717 ok( msgCount == 1,
"got message count %lu.\n", msgCount );
9720 msgCount = 0xdeadbeef;
9724 ok( msgCount == 2,
"got message count %lu.\n", msgCount );
9739 IDirectPlay4 *pDP[2];
9745 DWORD dwNumMsgs, dwNumBytes;
9747 DWORD dwDataSize = 1024;
9754 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
9755 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
9761 dwNumMsgs = dwNumBytes = -1;
9763 &dwNumMsgs, &dwNumBytes );
9765 check( -1, dwNumMsgs );
9766 check( -1, dwNumBytes );
9779 dwNumMsgs = dwNumBytes = -1;
9781 &dwNumMsgs, &dwNumBytes );
9783 check( 0, dwNumMsgs );
9784 check( 0, dwNumBytes );
9802 dwNumMsgs = dwNumBytes = -1;
9805 &dwNumMsgs, &dwNumBytes );
9807 check( -1, dwNumMsgs );
9808 check( -1, dwNumBytes );
9810 dwNumMsgs = dwNumBytes = -1;
9813 &dwNumMsgs, &dwNumBytes );
9815 check( -1, dwNumMsgs );
9816 check( -1, dwNumBytes );
9818 dwNumMsgs = dwNumBytes = -1;
9821 &dwNumMsgs, &dwNumBytes );
9823 check( -1, dwNumMsgs );
9824 check( -1, dwNumBytes );
9826 dwNumMsgs = dwNumBytes = -1;
9830 &dwNumMsgs, &dwNumBytes );
9832 check( -1, dwNumMsgs );
9833 check( -1, dwNumBytes );
9839 dwNumMsgs = dwNumBytes = -1;
9842 &dwNumMsgs, &dwNumBytes );
9844 check( -1, dwNumMsgs );
9845 check( -1, dwNumBytes );
9848 dwNumMsgs = dwNumBytes = -1;
9851 &dwNumMsgs, &dwNumBytes );
9853 check( -1, dwNumMsgs );
9854 check( -1, dwNumBytes );
9857 dwNumMsgs = dwNumBytes = -1;
9860 &dwNumMsgs, &dwNumBytes );
9862 check( 0, dwNumMsgs );
9863 check( 0, dwNumBytes );
9865 dwNumMsgs = dwNumBytes = -1;
9868 &dwNumMsgs, &dwNumBytes );
9870 check( 0, dwNumMsgs );
9871 check( 0, dwNumBytes );
9875 dwNumMsgs = dwNumBytes = -1;
9878 &dwNumMsgs, &dwNumBytes );
9880 check( 2, dwNumMsgs );
9881 check( 96, dwNumBytes );
9883 dwNumMsgs = dwNumBytes = -1;
9886 &dwNumMsgs, &dwNumBytes );
9888 check( 0, dwNumMsgs );
9889 check( 0, dwNumBytes );
9891 dwNumMsgs = dwNumBytes = -1;
9894 &dwNumMsgs, &dwNumBytes );
9896 check( 5, dwNumMsgs );
9897 check( 240, dwNumBytes );
9899 dwNumMsgs = dwNumBytes = -1;
9902 NULL, &dwNumBytes );
9904 check( -1, dwNumMsgs );
9905 check( 0, dwNumBytes );
9907 dwNumMsgs = dwNumBytes = -1;
9912 check( 0, dwNumMsgs );
9913 check( -1, dwNumBytes );
9915 dwNumMsgs = dwNumBytes = -1;
9920 check( -1, dwNumMsgs );
9921 check( -1, dwNumBytes );
9923 dwNumMsgs = dwNumBytes = -1;
9926 &dwNumMsgs, &dwNumBytes );
9928 check( 0, dwNumMsgs );
9929 check( 0, dwNumBytes );
9939 dwNumMsgs = dwNumBytes = -1;
9942 &dwNumMsgs, &dwNumBytes );
9944 check( 0, dwNumMsgs );
9945 check( 0, dwNumBytes );
9959 dwNumMsgs = dwNumBytes = -1;
9962 &dwNumMsgs, &dwNumBytes );
9964 check( 4, dwNumMsgs );
9965 check( 4*dwDataSize, dwNumBytes );
9967 dwNumMsgs = dwNumBytes = -1;
9970 &dwNumMsgs, &dwNumBytes );
9972 check( 3, dwNumMsgs );
9973 check( 3*dwDataSize, dwNumBytes );
9975 dwNumMsgs = dwNumBytes = -1;
9978 &dwNumMsgs, &dwNumBytes );
9980 check( 2, dwNumMsgs );
9981 check( 2*dwDataSize, dwNumBytes );
9983 dwNumMsgs = dwNumBytes = -1;
9986 &dwNumMsgs, &dwNumBytes );
9988 check( 4, dwNumMsgs );
9989 check( 4*dwDataSize, dwNumBytes );
9991 dwNumMsgs = dwNumBytes = -1;
9994 &dwNumMsgs, &dwNumBytes );
9996 check( 3, dwNumMsgs );
9997 check( 3*dwDataSize, dwNumBytes );
9999 dwNumMsgs = dwNumBytes = -1;
10002 &dwNumMsgs, &dwNumBytes );
10004 check( 5, dwNumMsgs );
10005 check( 5*dwDataSize, dwNumBytes );
10007 dwNumMsgs = dwNumBytes = -1;
10010 &dwNumMsgs, &dwNumBytes );
10012 check( 4, dwNumMsgs );
10013 check( 4*dwDataSize, dwNumBytes );
10015 dwNumMsgs = dwNumBytes = -1;
10018 &dwNumMsgs, &dwNumBytes );
10020 check( 5, dwNumMsgs );
10021 check( 5*dwDataSize, dwNumBytes );
10024 dwNumMsgs = dwNumBytes = -1;
10027 &dwNumMsgs, &dwNumBytes );
10029 check( 0, dwNumMsgs );
10030 check( 0, dwNumBytes );
10032 dwNumMsgs = dwNumBytes = -1;
10035 &dwNumMsgs, &dwNumBytes );
10037 check( 0, dwNumMsgs );
10038 check( 0, dwNumBytes );
10052 IDirectPlay4 *pDP[2];
10054 DPID dpid[2], idFrom, idTo;
10063 LPCSTR lpDataLocal[] = {
"local_0",
"local_1" };
10064 LPCSTR lpDataRemote[] = {
"remote_0",
"remote_1" };
10065 LPCSTR lpDataFake =
"ugly_fake_data";
10067 DWORD dwDataSizeLocal =
strlen(lpDataLocal[0])+1,
10068 dwDataSizeRemote =
strlen(lpDataRemote[0])+1,
10069 dwDataSizeFake =
strlen(lpDataFake)+1,
10073 for (
i=0;
i<2;
i++)
10076 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
10077 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
10109 for (
i=0;
i<2;
i++)
10120 for (
i=0;
i<2;
i++)
10135 for (
i=0;
i<2;
i++)
10137 dwDataSizeGet = dwDataSizeFake;
10138 strcpy( lpDataGet, lpDataFake );
10140 lpDataGet, &dwDataSizeGet,
10143 check( dwDataSizeLocal, dwDataSizeGet );
10146 dwDataSizeGet = dwDataSizeFake;
10147 strcpy( lpDataGet, lpDataFake );
10149 lpDataGet, &dwDataSizeGet,
10152 check( dwDataSizeRemote, dwDataSizeGet );
10153 checkStr( lpDataRemote[
i], lpDataGet );
10160 for (
i=0;
i<2;
i++)
10175 for (
i=0;
i<2;
i++)
10177 dwDataSizeGet = dwDataSizeFake;
10178 strcpy( lpDataGet, lpDataFake );
10180 lpDataGet, &dwDataSizeGet,
10183 check( dwDataSizeLocal, dwDataSizeGet );
10184 checkStr( lpDataLocal[!
i], lpDataGet );
10186 dwDataSizeGet = dwDataSizeFake;
10187 strcpy( lpDataGet, lpDataFake );
10189 lpDataGet, &dwDataSizeGet,
10192 check( dwDataSizeRemote, dwDataSizeGet );
10193 checkStr( lpDataRemote[!
i], lpDataGet );
10203 for (
i=0;
i<2;
i++)
10206 check( 2, dwCount );
10208 check( 0, dwCount );
10212 for (
i=0;
i<2;
i++)
10214 for (
j=0;
j<2;
j++)
10219 check( 29, dwDataSize );
10231 lpData, &dwDataSize );
10238 (
LPVOID) lpDataRemote[0], dwDataSizeRemote,
10243 for (
i=0;
i<2;
i++)
10246 lpData, &dwDataSize );
10248 check( 29, dwDataSize );
10278 IDirectPlay4 *pDP[2];
10280 DPID dpid[2], idFrom, idTo;
10285 DWORD dwDataSize = 1024;
10289 for (
i=0;
i<2;
i++)
10292 &IID_IDirectPlay4A, (
LPVOID*) &pDP[
i] );
10293 ok(
SUCCEEDED(
hr),
"CCI of CLSID_DirectPlay / IID_IDirectPlay4A failed\n" );
10327 check( 1, dwCount );
10330 lpData, &dwDataSize );
10336 check( 0, dwCount );
10338 lpData, &dwDataSize );
10348 check( 0, dwCount );
10350 lpData, &dwDataSize );
10355 check( 2, dwCount );
10358 lpData, &dwDataSize );
10364 for (
i=0;
i<2;
i++)
10367 lpData, &dwDataSize );
10370 check( dpid[1], idTo );
10414 IDirectPlay4 *dp4 = (IDirectPlay4*)(
ULONG_PTR)0xdeadbeefdeadbeefull;
10416 IDirectPlay4 *dp4 = (IDirectPlay4*)0xdeadbeef;
10431 "DirectPlay create failed: %08lx, expected CLASS_E_NOAGGREGATION\n",
hr);
10433 ok(!dp4 || dp4 == (IDirectPlay4*)(
ULONG_PTR)0xdeadbeefdeadbeefull,
"dp4 = %p\n", dp4);
10435 ok(!dp4 || dp4 == (IDirectPlay4*)0xdeadbeef,
"dp4 = %p\n", dp4);
10441 ok(
hr ==
E_NOINTERFACE,
"DirectPlay create failed: %08lx, expected E_NOINTERFACE\n",
hr);
10446 ok(
hr ==
S_OK,
"DirectPlay create failed: %08lx, expected S_OK\n",
hr);
10449 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlay2A failed: %08lx\n",
hr);
10453 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlay2 failed: %08lx\n",
hr);
10457 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlay3A failed: %08lx\n",
hr);
10461 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlay3 failed: %08lx\n",
hr);
10465 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlay4A failed: %08lx\n",
hr);
10470 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlay failed: %08lx\n",
hr);
10474 ok(
hr ==
S_OK,
"QueryInterface for IID_IUnknown failed: %08lx\n",
hr);
10476 IUnknown_Release(unk);
10478 ok(refcount == 0,
"refcount == %lu, expected 0\n", refcount);
10484 IDirectPlayLobby *dpl = (IDirectPlayLobby*)(
ULONG_PTR)0xdeadbeefdeadbeefull;
10486 IDirectPlayLobby *dpl = (IDirectPlayLobby*)0xdeadbeef;
10490 IDirectPlayLobby2 *dpl2;
10492 IDirectPlayLobby3 *dpl3;
10506 "DirectPlayLobby create failed: %08lx, expected CLASS_E_NOAGGREGATION\n",
hr);
10508 ok(!dpl || dpl == (IDirectPlayLobby*)(
ULONG_PTR)0xdeadbeefdeadbeefull,
"dpl = %p\n", dpl);
10510 ok(!dpl || dpl == (IDirectPlayLobby*)0xdeadbeef,
"dpl = %p\n", dpl);
10516 ok(
hr ==
E_NOINTERFACE,
"DirectPlayLobby create failed: %08lx, expected E_NOINTERFACE\n",
hr);
10521 ok(
hr ==
S_OK,
"DirectPlayLobby create failed: %08lx, expected S_OK\n",
hr);
10524 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlayLobbyA failed: %08lx\n",
hr);
10528 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlayLobby2 failed: %08lx\n",
hr);
10532 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlayLobby2A failed: %08lx\n",
hr);
10536 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlayLobby3 failed: %08lx\n",
hr);
10540 ok(
hr ==
S_OK,
"QueryInterface for IID_IDirectPlayLobby3A failed: %08lx\n",
hr);
10545 ok(
hr ==
S_OK,
"QueryInterface for IID_IUnknown failed: %08lx\n",
hr);
10546 IUnknown_Release(unk);
10549 ok(refcount == 0,
"refcount == %lu, expected 0\n", refcount);
10587 if (
hr !=
S_OK)
goto done;
10589 hr = INetFwMgr_get_LocalPolicy( mgr, &
policy );
10591 if (
hr !=
S_OK)
goto done;
10594 if (
hr !=
S_OK)
goto done;
10602 if (mgr) INetFwMgr_Release( mgr );
10604 return (
enabled == VARIANT_TRUE);
10636 if (
hr !=
S_OK)
goto done;
10638 hr = INetFwMgr_get_LocalPolicy( mgr, &
policy );
10640 if (
hr !=
S_OK)
goto done;
10643 if (
hr !=
S_OK)
goto done;
10645 hr = INetFwProfile_get_AuthorizedApplications(
profile, &apps );
10647 if (
hr !=
S_OK)
goto done;
10650 &IID_INetFwAuthorizedApplication, (
void **)&app );
10652 if (
hr !=
S_OK)
goto done;
10654 hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app,
image );
10655 if (
hr !=
S_OK)
goto done;
10658 hr = INetFwAuthorizedApplication_put_Name( app,
name );
10661 if (
hr !=
S_OK)
goto done;
10664 hr = INetFwAuthorizedApplications_Add( apps, app );
10666 hr = INetFwAuthorizedApplications_Remove( apps,
image );
10669 if (
hr !=
S_OK)
goto done;
10671 INetFwAuthorizedApplication_Release( app );
10673 &IID_INetFwAuthorizedApplication, (
void **)&app );
10675 if (
hr !=
S_OK)
goto done;
10679 hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app,
image );
10680 if (
hr !=
S_OK)
goto done;
10683 hr = INetFwAuthorizedApplication_put_Name( app,
name );
10686 if (
hr !=
S_OK)
goto done;
10689 hr = INetFwAuthorizedApplications_Add( apps, app );
10691 hr = INetFwAuthorizedApplications_Remove( apps,
image );
10696 if (app) INetFwAuthorizedApplication_Release( app );
10697 if (apps) INetFwAuthorizedApplications_Release( apps );
10700 if (mgr) INetFwMgr_Release( mgr );
10735 BOOL firewall_enabled;
10742 skip(
"Failed to get systems directory\n");
10749 win_skip(
"dplayx is missing or a stub dll, skipping tests\n");
10755 skip(
"no privileges, skipping tests to avoid firewall dialog\n");
10759 if (firewall_enabled)
10764 skip(
"can't authorize app in firewall %08lx\n",
hr);
10800 skip(
"Run in interactive mode to run all dplayx tests.\n");
10804 trace(
"Running in interactive mode, tests will take a while\n");
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
static WCHAR fullName[MAX_STRING_RESOURCE_LEN]
#define GetProcAddress(x, y)
#define GetCurrentProcess()
static void cleanup(void)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR filename, LPDWORD handle)
BOOL WINAPI VerQueryValueA(LPCVOID pBlock, LPCSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
BOOL WINAPI GetFileVersionInfoA(LPCSTR filename, DWORD handle, DWORD datasize, LPVOID data)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
#define DPSESSION_MIGRATEHOST
#define IDirectPlayX_Release(p)
#define DPERR_INVALIDOBJECT
#define DPENUMPLAYERS_LOCAL
struct tagDPMSG_DESTROYPLAYERORGROUP * LPDPMSG_DESTROYPLAYERORGROUP
#define IDirectPlayX_GetGroupOwner(p, a, b)
#define DPCAPS_GUARANTEEDSUPPORTED
#define DPENUMPLAYERS_ALL
#define DPERR_ACCESSDENIED
#define DPCAPS_KEEPALIVEOPTIMIZED
#define DPERR_UNKNOWNAPPLICATION
#define DPPLAYERTYPE_PLAYER
#define DPERR_NOTLOGGEDIN
#define DPSESSION_CLIENTSERVER
#define DPERR_LOGONDENIED
#define DPSEND_HIGHPRIORITY
#define DPENUMPLAYERS_GROUP
#define IDirectPlayX_QueryInterface(p, a, b)
#define DPSESSION_NOMESSAGEID
#define DPERR_NOTREGISTERED
#define IDirectPlayX_Receive(p, a, b, c, d, e)
#define IDirectPlayX_Open(p, a, b)
#define DPSYS_SETSESSIONDESC
#define DPERR_CANTADDPLAYER
#define DPERR_NOSERVICEPROVIDER
#define IDirectPlayX_GetPlayerName(p, a, b, c)
#define DPERR_BUFFERTOOLARGE
#define DPENUMGROUPS_STAGINGAREA
#define IDirectPlayX_SecureOpen(p, a, b, c, d)
#define DPERR_SESSIONLOST
#define DPERR_NONEWPLAYERS
struct tagDPMSG_SECUREMESSAGE * LPDPMSG_SECUREMESSAGE
#define IDirectPlayX_AddGroupToGroup(p, a, b)
#define IDirectPlayX_CreatePlayer(p, a, b, c, d, e, f)
struct IDirectPlay * LPDIRECTPLAY
#define IDirectPlayX_CreateGroup(p, a, b, c, d, e)
#define IDirectPlayX_SetPlayerName(p, a, b, c)
#define DPID_SERVERPLAYER
#define DPSESSION_PASSWORDREQUIRED
#define DPERR_UNINITIALIZED
#define DPERR_CANTCREATEPLAYER
#define DPERR_ALREADYREGISTERED
#define IDirectPlayX_Send(p, a, b, c, d, e)
#define DPERR_INVALIDGROUP
#define IDirectPlayX_CreateGroupInGroup(p, a, b, c, d, e, f)
#define DPPLAYER_SERVERPLAYER
#define DPSYS_DESTROYPLAYERORGROUP
#define DPRECEIVE_TOPLAYER
#define IDirectPlayX_EnumConnections(p, a, b, c, d)
#define DPGROUP_STAGINGAREA
#define DPSYS_SECUREMESSAGE
#define DPERR_AUTHENTICATIONFAILED
#define DPERR_ENCRYPTIONFAILED
#define DPERR_INVALIDINTERFACE
#define DPENUMSESSIONS_PASSWORDREQUIRED
#define DPERR_NOINTERFACE
#define DPSEND_LOBBYSYSTEMMESSAGE
#define IDirectPlayX_EnumGroupPlayers(p, a, b, c, d, e)
#define DPENUMPLAYERS_REMOTE
#define DPSEND_CLOSESTREAM
#define DPSEND_NOSENDCOMPLETEMSG
#define DPENUMPLAYERS_SESSION
#define DPERR_CANNOTCREATESERVER
#define IDirectPlayX_GetGroupData(p, a, b, c, d)
#define IDirectPlayX_AddPlayerToGroup(p, a, b)
#define IDirectPlayX_EnumPlayers(p, a, b, c, d)
#define DPPLAYER_SPECTATOR
#define DPCAPS_ASYNCSUPPORTED
#define DPERR_CANTLOADCAPI
#define DPERR_ENCRYPTIONNOTSUPPORTED
#define DPERR_CAPSNOTAVAILABLEYET
#define IDirectPlayX_SetPlayerData(p, a, b, c, d)
#define DPSESSION_NEWPLAYERSDISABLED
#define DPSYS_SENDCOMPLETE
#define DPENUMGROUPS_SESSION
#define DPSYS_SETGROUPOWNER
#define DPENUMSESSIONS_ASYNC
#define DPENUMPLAYERS_SPECTATOR
#define DPCONNECTION_DIRECTPLAY
#define DPSEND_GUARANTEED
#define DPERR_CONNECTIONLOST
#define DPENUMGROUPS_SHORTCUT
#define DPERR_BUFFERTOOSMALL
#define DPSESSION_SECURESERVER
#define DPOPEN_RETURNSTATUS
#define DPERR_ALREADYINITIALIZED
#define DPERR_INVALIDFLAGS
#define DPERR_CANTLOADSSPI
#define DPPLAYERTYPE_GROUP
#define IDirectPlay_Release(p)
#define DPENUMPLAYERS_SERVERPLAYER
#define DPERR_SERVICEPROVIDERLOADED
#define DPERR_UNSUPPORTED
#define DPENUMGROUPS_REMOTE
#define DPCONNECT_RETURNSTATUS
#define DPSESSION_MULTICASTSERVER
#define DPENUMPLAYERS_OWNER
#define DPCAPS_SIGNINGSUPPORTED
#define DPERR_UNKNOWNMESSAGE
#define DPCAPS_GROUPOPTIMIZED
#define DPSYS_SETPLAYERORGROUPDATA
#define IDirectPlayX_GetMessageQueue(p, a, b, c, d, e)
#define DPSYS_ADDGROUPTOGROUP
#define DPENUMSESSIONS_STOPASYNC
#define DPERR_CANTCREATEGROUP
#define DPSESSION_KEEPALIVE
#define DPSYS_DELETEPLAYERFROMGROUP
#define IDirectPlayX_DestroyPlayer(p, a)
#define IDirectPlayX_InitializeConnection(p, a, b)
#define DPCAPS_ASYNCCANCELSUPPORTED
#define DPLCONNECTION_CREATESESSION
#define IDirectPlayX_GetCaps(p, a, b)
#define DPERR_UNAVAILABLE
#define DPMESSAGEQUEUE_RECEIVE
BOOL(CALLBACK * LPDPENUMSESSIONSCALLBACK2)(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
#define DPERR_NONAMESERVERFOUND
#define DPERR_CANCELFAILED
#define IDirectPlayX_GetPlayerFlags(p, a, b)
struct tagDPMSG_CREATEPLAYERORGROUP DPMSG_CREATEPLAYERORGROUP
#define DPERR_APPNOTSTARTED
#define DPERR_INVALIDPLAYER
struct tagDPCREDENTIALS DPCREDENTIALS
#define DPSESSION_JOINDISABLED
#define IDirectPlay2_Release(p)
struct IDirectPlay3 IDirectPlay3A
#define DPERR_NOCONNECTION
#define DPSYS_DELETEGROUPFROMGROUP
#define DPCAPS_SENDPRIORITYSUPPORTED
#define DPERR_INVALIDPARAMS
#define DPENUMSESSIONS_ALL
#define DPSYS_CREATEPLAYERORGROUP
#define IDirectPlay3_Release(p)
#define DPERR_INVALIDPASSWORD
#define DPERR_ACTIVEPLAYERS
#define DPSESSION_NODATAMESSAGES
struct IDirectPlay4 IDirectPlay4A
#define IDirectPlayX_GetGroupName(p, a, b, c)
#define IDirectPlayX_GetPlayerData(p, a, b, c, d)
#define DPSEND_OPENSTREAM
#define IDirectPlayX_EnumGroupsInGroup(p, a, b, c, d, e)
#define DPSYS_SESSIONLOST
#define DPCAPS_SENDTIMEOUTSUPPORTED
#define DPERR_INVALIDPARAM
#define IDirectPlayX_EnumSessions(p, a, b, c, d, e)
#define DPMESSAGEQUEUE_SEND
#define DPENUMGROUPS_HIDDEN
BOOL(CALLBACK * LPDPENUMDPCALLBACKA)(LPGUID lpguidSP, LPSTR lpSPName, DWORD dwMajorVersion, DWORD dwMinorVersion, LPVOID lpContext)
struct IDirectPlay2 IDirectPlay2A
#define DPCAPS_GUARANTEEDOPTIMIZED
struct tagDPMSG_CREATEPLAYERORGROUP * LPDPMSG_CREATEPLAYERORGROUP
#define IDirectPlayX_Close(p)
#define DPRECEIVE_FROMPLAYER
#define DPERR_CANTCREATEPROCESS
#define IDirectPlayX_GetPlayerAddress(p, a, b, c)
#define DPSYS_SETPLAYERORGROUPNAME
#define DPERR_INVALIDPRIORITY
#define IDirectPlayX_GetPlayerCaps(p, a, b, c)
#define DPERR_CANTCREATESESSION
#define IDirectPlayX_GetPlayerAccount(p, a, b, c, d)
#define DPSYS_ADDPLAYERTOGROUP
#define DPENUMSESSIONS_AVAILABLE
#define DPSEND_MAX_PRIORITY
#define DPCAPS_ENCRYPTIONSUPPORTED
#define IDirectPlayX_EnumGroups(p, a, b, c, d)
#define DPSESSION_DIRECTPLAYPROTOCOL
#define DPSESSION_PRIVATE
#define DPPLAYERCAPS_LOCAL
#define IDirectPlayX_GetMessageCount(p, a, b)
#define DPSESSION_OPTIMIZELATENCY
#define DPLCONNECTION_JOINSESSION
#define IDirectPlayX_GetSessionDesc(p, a, b)
#define DPENUMGROUPS_LOCAL
#define DPGETCAPS_GUARANTEED
#define DPCONNECTION_DIRECTPLAYLOBBY
#define IDirectPlayX_SetSessionDesc(p, a, b)
#define DPSESSION_NOPRESERVEORDER
BOOL(CALLBACK * LPDPENUMDPCALLBACKW)(LPGUID lpguidSP, LPWSTR lpSPName, DWORD dwMajorVersion, DWORD dwMinorVersion, LPVOID lpContext)
#define DPSYS_STARTSESSION
#define DPENUMSESSIONS_RETURNSTATUS
#define DPCAPS_ASYNCCANCELALLSUPPORTED
struct tagDPSESSIONDESC2 DPSESSIONDESC2
#define DPERR_CANTLOADSECURITYPACKAGE
static HRESULT enumSessionsAsyncWait(EnumSessionsParam *param, DWORD timeout)
static DPID checkCreatePlayerOrGroupMessage_(int line, IDirectPlay4 *dp, DWORD expectedType, DPID expectedDpid, DWORD expectedCurrentPlayers, void *expectedPlayerData, DWORD expectedPlayerDataSize, const char *expectedShortName, const char *expectedLongName, DPID expectedParent, DWORD expectedFlags)
static void checkSpData_(int line, SpData *spData, unsigned short *udpPort)
#define check_EnumSessions(dp, dpsd, flags, expectedHr, expectedSessionCount, timeoutExpected, requestExpected, expectedPassword, replyCount, ansi, hrTodo)
static BOOL CALLBACK EnumGroups_cb(DPID dpId, DWORD dwPlayerType, LPCDPNAME lpName, DWORD dwFlags, LPVOID lpContext)
static void test_groups_p2p(void)
static void sendGroupDataChanged_(int line, SOCKET sock, unsigned short port, DPID groupId, void *data, DWORD dataSize)
static int enum_address_cb_count
static void test_EnumerateProviders(void)
static void sendSuperEnumPlayersReply_(int line, SOCKET sock, unsigned short tcpPort, unsigned short udpPort, const DPSESSIONDESC2 *dpsd, const WCHAR *sessionName)
static OpenParam * openAsync(IDirectPlay4 *dp, DPSESSIONDESC2 *dpsd, DWORD flags)
static void joinSession_(int line, IDirectPlay4 *dp, DPSESSIONDESC2 *dpsd, DPSESSIONDESC2 *serverDpsd, SOCKET *sendSock, SOCKET *recvSock, unsigned short *udpPort)
static DWORD CALLBACK createPlayerProc(void *p)
static unsigned short receiveAddPlayerToGroup_(int line, SOCKET sock, DPID expectedPlayerId, DPID expectedGroupId)
static LPCSTR dpMsgType2str(DWORD dwType)
static BOOL CALLBACK EnumAddress_cb2(REFGUID guidDataType, DWORD dwDataSize, LPCVOID lpData, LPVOID lpContext)
static BOOL CALLBACK countSessionsCallback(const DPSESSIONDESC2 *thisSd, DWORD *timeout, DWORD flags, void *context)
static int enum_addresses_cb_count
static void test_GetPlayerCaps(void)
static void test_interactive_Receive(void)
static void checkPackedPlayer_(int line, PackedPlayer *player, DWORD expectedFlags, DPID expectedId, DWORD expectedShortNameLength, DWORD expectedLongNameLength, DWORD expectedPlayerDataSize, DPID expectedSystemPlayerId)
static void sendEnumSessionsReply_(int line, SOCKET sock, unsigned short port, const DPSESSIONDESC2 *dpsd)
static void test_host_migration(void)
static BOOL is_stub_dll(const char *filename)
static unsigned short receivePingReply_(int line, SOCKET sock, DPID expectedFromId, DWORD expectedTickCount)
#define receiveGuaranteedGameMessage(sock, expectedFromId, expectedToId, expectedData, expectedDataSize)
#define receivePingReply(sock, expectedFromId, expectedTickCount)
static void test_CreateGroup(void)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
static void test_EnumGroups(void)
static int receiveMessage_(int line, SOCKET sock, void *buffer, int size)
static BOOL CALLBACK EnumConnections_cb(LPCGUID lpguidSP, LPVOID lpConnection, DWORD dwConnectionSize, LPCDPNAME lpName, DWORD dwFlags, LPVOID lpContext)
static void test_GROUPDATACHANGED(void)
static SOCKET listenTcp_(int line, unsigned short port)
#define checkSetPlayerOrGroupDataMessage(dp, expectedPlayerType, expectedDpid, expectedData, expectedDataSize)
static void sendGuaranteedGameMessage_(int line, SOCKET sock, unsigned short port, DPID fromId, DPID toId, void *data, DWORD dataSize)
#define FLAGS_DPLCONNECTION
static void test_COM_dplobby(void)
struct tagCallbackData CallbackData
static void test_DirectPlayCreate(void)
#define checkPlayerMessage(dp, expectedFromId, expectedData, expectedDataSize)
static void test_SessionDesc(void)
#define checkLP(expected, result)
static void checkGameMessage_(int line, GameMessage *message, DPID expectedFromId, DPID expectedToId)
static HRESULT createPlayerAsyncWait(CreatePlayerParam *param, DWORD timeout)
static void test_GetPlayerFlags(void)
static HRESULT openAsyncWait(OpenParam *param, DWORD timeout)
static BOOL CALLBACK EnumPlayers_cb(DPID dpId, DWORD dwPlayerType, LPCDPNAME lpName, DWORD dwFlags, LPVOID lpContext)
static HRESULT set_firewall(enum firewall_op op)
static unsigned short checkSpHeader_(int line, SpHeader *header, DWORD expectedSize)
#define receiveRequestPlayerId(sock, expectedFlags)
static const char * dbgStrAW(const void *str, BOOL ansi)
#define sendCreatePlayer(sock, tcpPort, udpPort, shortName, longName, playerData, playerDataSize)
static void sendAddForward_(int line, SOCKET sock, unsigned short port, unsigned short tcpPort, unsigned short udpPort)
#define checkGuid(expected, result)
static void test_interactive_GetMessageQueue(void)
static void check_CreatePlayer_(int line, IDirectPlay4 *dp, DPID *dpid, DPNAME *name, DWORD flags, HRESULT expectedHr, DPID expectedDpid, SOCKET recvSock, BOOL requestExpected, DWORD expectedFlags, const WCHAR *expectedShortName, const char *expectedShortNameA, const WCHAR *expectedLongName, const char *expectedLongNameA, DWORD expectedCurrentPlayers)
#define sendEnumSessionsReply(sock, port, dpsd)
static void test_GetPlayerAddress(void)
#define checkPlayerExists(dp, expectedDpid, expectedPlayerType, expectedShortName, expectedLongName, expectedFlags, expectedPlayerData, expectedPlayerDataSize)
#define sendPing(sock, port, fromId, tickCount)
#define receiveAddPlayerToGroup(sock, expectedPlayerId, expectedGroupId)
static void checkNoMorePlayerMessages_(int line, IDirectPlay4 *dp)
static BOOL CALLBACK EnumSessions_cb_EnumGroups(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
static void test_Open(void)
static unsigned short receiveGuaranteedGameMessage_(int line, SOCKET sock, DPID expectedFromId, DPID expectedToId, void *expectedData, DWORD expectedDataSize)
static void test_GetMessageCount(void)
static void check_EnumSessions_(int line, IDirectPlay4 *dp, DPSESSIONDESC2 *dpsd, DWORD flags, HRESULT expectedHr, DWORD expectedSessionCount, BOOL timeoutExpected, BOOL requestExpected, const WCHAR *expectedPassword, DWORD replyCount, BOOL ansi, BOOL hrTodo)
static BOOL CALLBACK EnumSessions_cb_join_secure(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
static BOOL CALLBACK EnumAddress_cb(REFGUID guidDataType, DWORD dwDataSize, LPCVOID lpData, LPVOID lpContext)
static char dpid2char(DPID *dpid, DWORD dpidSize, DPID idPlayer)
#define joinSession(dp, dpsd, serverDpsd, sendSock, recvSock, udpPort)
#define sendGuaranteedGameMessage(sock, port, fromId, toId, data, dataSize)
static LPCSTR dwFlags2str(DWORD dwFlags, DWORD flagType)
static IDirectPlay4 * create_session(DPSESSIONDESC2 *lpdpsd)
static BOOL CALLBACK EnumAddressesCallback(REFGUID guidDataType, DWORD size, const void *data, void *context)
static void test_EnumPlayers(void)
static unsigned short receiveEnumSessionsRequest_(int line, SOCKET sock, const GUID *expectedAppGuid, const WCHAR *expectedPassword, DWORD expectedFlags)
#define checkNoMoreMessages(sock)
static void test_interactive_CreatePlayer(void)
static BOOL CALLBACK callback_providersW(GUID *guid, WCHAR *name, DWORD major, DWORD minor, void *arg)
static void sendGameMessage_(int line, SOCKET sock, DPID fromId, DPID toId, void *data, DWORD dataSize)
static LPSTR get_temp_buffer(void)
#define receiveCreatePlayer(sock, expectedPlayerId, expectedFlags, expectedShortName, expectedLongName, expectedPlayerData, expectedPlayerDataSize)
#define checkConv(expected, result, function)
static void test_interactive_EnumSessions(void)
static BOOL CALLBACK getPlayerIdsCallback(DPID dpid, DWORD playerType, const DPNAME *name, DWORD flags, void *context)
#define sendGameMessage(sock, fromId, toId, data, dataSize)
static void test_EnumConnections(void)
static void test_InitializeConnection(void)
static void sendCreatePlayer_(int line, SOCKET sock, unsigned short tcpPort, unsigned short udpPort, const WCHAR *shortName, const WCHAR *longName, void *playerData, DWORD playerDataSize)
#define createPlayer(dp, inDpid, event, data, dataSize, flags, sendSock, recvSock)
#define FLAGS_DPCONNECTION
static void test_Send(void)
static int strcmpAW(const void *str0, const void *str1, BOOL ansi)
static void sendPing_(int line, SOCKET sock, unsigned short port, DPID fromId, DWORD tickCount)
static void check_EnumSessions_async_(int line, DPSESSIONDESC2 *dpsd, IDirectPlay4 *dp, BOOL ansi)
static DPID checkPlayerMessage_(int line, IDirectPlay4 *dp, DPID expectedFromId, void *expectedData, DWORD expectedDataSize)
static void checkFlags_(unsigned line, DWORD expected, DWORD result, DWORD flags)
#define checkAddPlayerToGroupMessage(dp, expectedGroupId, expectedPlayerId)
#define check(expected, result)
static void checkGroupList_(int line, IDirectPlay4 *dp, ExpectedPlayer *expectedGroups, int expectedGroupCount)
static void receiveGameMessage_(int line, SOCKET sock, DPID expectedFromId, DPID expectedToId, void *expectedData, DWORD expectedDataSize)
static void sendRequestPlayerReply_(int line, SOCKET sock, unsigned short port, DPID id, HRESULT result)
static BOOL CALLBACK callback_providersA(GUID *guid, char *name, DWORD major, DWORD minor, void *arg)
static void test_interactive_Open(void)
static BOOL CALLBACK EnumSessions_cb(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
static void test_groups_cs(void)
static void test_GetCaps(void)
static DWORD CALLBACK enumSessionsProc(void *p)
static void init_TCPIP_provider(IDirectPlay4 *pDP, LPCSTR strIPAddressString, WORD port)
static void test_Receive(void)
#define receiveAddForwardAck(sock, expectedPlayerId)
static BOOL CALLBACK EnumConnections_cb2(LPCGUID lpguidSP, LPVOID lpConnection, DWORD dwConnectionSize, LPCDPNAME lpName, DWORD dwFlags, LPVOID lpContext)
#define check_CreatePlayer(dp, dpid, name, flags, expectedHr, expectedDpid, recvSock, requestExpected, expectedFlags, expectedShortName, expectedShortNameA, expectedLongName, expectedLongNameA, expectedCurrentPlayers)
static void test_ADDFORWARD(void)
static void checkNoMoreAccepts_(int line, SOCKET listenSock)
static SOCKET connectTcp_(int line, unsigned short port)
static void test_CREATEPLAYER(void)
static BOOL is_process_elevated(void)
static void test_PING(void)
#define sendAddForward(sock, port, tcpPort, udpPort)
static void check_Open_(int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, const DPSESSIONDESC2 *serverDpsd, BOOL idRequestExpected, BOOL forwardRequestExpected, unsigned short listenPort, const WCHAR *expectedPassword, HRESULT idReplyHr, HRESULT addForwardReplyHr, HRESULT expectedHr)
#define checkFlags(expected, result, flags)
static void checkMessageHeader_(int line, MessageHeader *header, WORD expectedCommand)
static void checkGroupPlayerList_(int line, DPID group, IDirectPlay4 *dp, ExpectedPlayer *expectedPlayers, int expectedPlayerCount)
static CreatePlayerParam * createPlayerAsync(IDirectPlay4 *dp, DPID *dpid, DPNAME *name, HANDLE event, void *data, DWORD dataSize, DWORD flags)
static unsigned short receiveAddForwardAck_(int line, SOCKET sock, DPID expectedPlayerId)
#define FLAGS_DPENUMGROUPS
static BOOL CALLBACK EnumSessions_cb2(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
static void checkPlayerExists_(int line, IDirectPlay4 *dp, DPID expectedDpid, DWORD expectedPlayerType, const char *expectedShortName, const char *expectedLongName, DWORD expectedFlags, BYTE *expectedPlayerData, DWORD expectedPlayerDataSize)
static void createPlayer_(int line, IDirectPlay4 *dp, DPID inDpid, HANDLE event, void *data, DWORD dataSize, DWORD flags, SOCKET sendSock, SOCKET recvSock)
static void test_EnumGroupsInGroup(void)
static unsigned short receiveAddForwardRequest_(int line, SOCKET sock, DPID expectedPlayerId, const WCHAR *expectedPassword, DWORD expectedTickCount, unsigned short *udpPort)
static void test_GetPlayerAccount(void)
#define check_EnumSessions_async(dpsd, dp, ansi)
static unsigned short receiveCreatePlayer_(int line, SOCKET sock, DPID expectedPlayerId, DWORD expectedFlags, const WCHAR *expectedShortName, const WCHAR *expectedLongName, void *expectedPlayerData, DWORD expectedPlayerDataSize)
struct tagCallbackData * lpCallbackData
#define sendGroupDataChanged(sock, port, groupId, data, dataSize)
static void test_interactive_Send(void)
static BOOL CALLBACK EnumSessions_cb_EnumPlayers(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
#define checkCreatePlayerOrGroupMessage(dp, expectedType, expectedDpid, expectedCurrentPlayers, expectedPlayerData, expectedPlayerDataSize, expectedShortName, expectedLongName, expectedParent, expectedFlags)
static SOCKET connectUdp_(int line, unsigned short port)
static SOCKET acceptTcp_(int line, SOCKET listenSock)
#define checkNoMorePlayerMessages(dp)
#define receiveGameMessage(sock, expectedFromId, expectedToId, expectedData, expectedDataSize)
#define FLAGS_DPENUMSESSIONS
static unsigned short receiveRequestPlayerId_(int line, SOCKET sock, DWORD expectedFlags)
static DPID checkSetPlayerOrGroupDataMessage_(int line, IDirectPlay4 *dp, DWORD expectedPlayerType, DPID expectedDpid, void *expectedData, DWORD expectedDataSize)
static void test_EnumSessions(void)
static DPID checkAddPlayerToGroupMessage_(int line, IDirectPlay4 *dp, DPID expectedGroupId, DPID expectedPlayerId)
static void test_PlayerData(void)
static DWORD CALLBACK openProc(void *p)
static void sendAddForwardReply_(int line, SOCKET sock, unsigned short port, HRESULT result)
static BOOL is_firewall_enabled(void)
static LPCSTR Guid2str(const GUID *guid)
#define checkHR(expected, result)
static LPCSTR dpResult2str(HRESULT hr)
static SOCKET bindUdp_(int line, unsigned short port)
#define FLAGS_DPMESSAGEQUEUE
static void test_GetMessageQueue(void)
#define receiveEnumSessionsRequest(sock, expectedAppGuid, expectedPassword, expectedFlags)
static void *static void *static LPDIRECTPLAY * lplpDP
static void test_AddPlayerToGroup(void)
#define FLAGS_DPENUMPLAYERS
static BOOL CALLBACK EnumAddressTypeCallback(REFGUID guidDataType, LPVOID lpContext, DWORD flags)
static void checkPlayerList_(int line, IDirectPlay4 *dp, ExpectedPlayer *expectedPlayers, int expectedPlayerCount)
static void test_PlayerName(void)
static BOOL CALLBACK checkPlayerListCallback(DPID dpid, DWORD playerType, const DPNAME *name, DWORD flags, void *context)
static void test_CreatePlayer(void)
static BOOL CALLBACK checkSessionListCallback(const DPSESSIONDESC2 *thisSd, DWORD *timeout, DWORD flags, void *context)
static void test_COM(void)
static HANDLE enumSessionsAsync(IDirectPlay4 *dp, DPSESSIONDESC2 *dpsd, DWORD timeout, LPDPENUMSESSIONSCALLBACK2 callback, void *context, DWORD flags)
static void checkNoMoreMessages_(int line, SOCKET sock)
static void test_remote_data_replication(void)
static BOOL CALLBACK EnumSessions_cb_join(LPCDPSESSIONDESC2 lpThisSD, LPDWORD lpdwTimeOut, DWORD dwFlags, LPVOID lpContext)
static void test_GroupOwner(void)
static void test_EnumAddresses(void)
#define checkStr(expected, result)
static void checkCreatePlayerOrGroupMessages_(int line, IDirectPlay4 *dp, DWORD expectedType, DPID expectedDpid, DWORD expectedCurrentPlayers, void *expectedPlayerData, DWORD expectedPlayerDataSize, const char *expectedShortName, const char *expectedLongName, DPID expectedParent, DWORD expectedFlags)
#define check_Open(dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, listenPort, expectedPassword, idReplyHr, addForwardReplyHr, expectedHr)
static void test_EnumAddressTypes(void)
#define sendRequestPlayerReply(sock, port, id, result)
#define IDirectPlayLobby_Release(p)
#define IDirectPlayLobby_QueryInterface(p, a, b)
#define IDirectPlayLobby_CreateCompoundAddress(p, a, b, c, d)
struct IDirectPlayLobby2 IDirectPlayLobby2A
struct IDirectPlayLobby3 IDirectPlayLobby3A
#define IDirectPlayLobby_EnumAddressTypes(p, a, b, c, d)
#define IDirectPlayLobby_EnumAddress(p, a, b, c, d)
struct IDirectPlayLobby IDirectPlayLobbyA
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum const GLvoid * addr
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define todo_wine_if(is_todo)
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
static const BYTE msgData[]
#define check_messages(a, b, c, d, e, f)
static const struct @663 sizes[]
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
@ COINIT_APARTMENTTHREADED
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define SUBLANG_ENGLISH_US
int int static __inline const char * wine_dbgstr_a(const char *s)
static __inline const char * wine_dbgstr_guid(const GUID *id)
XML_HIDDEN void xmlParserErrors const char const xmlChar * str1
static const char *static const char const char DWORD void DWORD *static const char const char DWORD void DWORD *static const char DWORD DWORD void * buff
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
ExpectedPlayer * expectedPlayers
ExpectedSession * expectedSessions
LPDPENUMSESSIONSCALLBACK2 callback
const char * expectedShortName
const char * expectedLongName
BYTE * expectedPlayerData
DWORD expectedPlayerDataSize
DWORD versionOrSystemPlayerId
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
#define INVALID_FILE_ATTRIBUTES
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
static UINT WPARAM LPARAM BOOL ansi
DWORD WINAPI GetLastError(void)
#define CLASS_E_NOAGGREGATION
enum _TOKEN_ELEVATION_TYPE TOKEN_ELEVATION_TYPE
int PASCAL FAR WSACleanup(void)