81{
85 struct
86 {
91 {
113 };
116
118
119
131
134 {
135 skip(
"Out of memory\n");
136 return;
137 }
138
139
140 for (
i = 0;
i < TestCount;
i++)
141 {
142 trace(
"%d: version %d.%d\n",
150 {
151 ok(!
Tests[
i].ExpectedSuccess,
"WSAStartup failed unexpectedly\n");
155 }
156 else
157 {
158 ok(
Tests[
i].ExpectedSuccess,
"WSAStartup succeeded unexpectedly\n");
163 else
167 }
168 if (
Tests[
i].ExpectedVersion)
170 else
174 sizeof(WsaData->szDescription),
175 "WinSock 2.0",
176 0x55);
177 ok(Okay,
"CheckStringBuffer failed\n");
179 sizeof(WsaData->szSystemStatus),
180 "Running",
181 0x55);
182 ok(Okay,
"CheckStringBuffer failed\n");
183 if (
LOBYTE(WsaData->wVersion) >= 2)
184 {
185 ok_dec(WsaData->iMaxSockets, 0);
186 ok_dec(WsaData->iMaxUdpDg, 0);
187 }
188 else
189 {
190 ok_dec(WsaData->iMaxSockets, 32767);
191 ok_dec(WsaData->iMaxUdpDg, 65467);
192 }
193 ok_ptr(WsaData->lpVendorInfo, (
PVOID)0x5555555555555555ULL);
194 }
195
196
204 sizeof(WsaData->szDescription),
205 "WinSock 2.0",
206 0x55);
207 ok(Okay,
"CheckStringBuffer failed\n");
209 sizeof(WsaData->szSystemStatus),
210 "Running",
211 0x55);
212 ok(Okay,
"CheckStringBuffer failed\n");
213 ok_dec(WsaData->iMaxSockets, 32767);
214 ok_dec(WsaData->iMaxUdpDg, 65467);
215 ok_ptr(WsaData->lpVendorInfo, (
PVOID)0x5555555555555555ULL);
218 {
226 sizeof(WsaData->szDescription),
227 "WinSock 2.0",
228 0x55);
229 ok(Okay,
"CheckStringBuffer failed\n");
231 sizeof(WsaData->szSystemStatus),
232 "Running",
233 0x55);
234 ok(Okay,
"CheckStringBuffer failed\n");
235 ok_dec(WsaData->iMaxSockets, 0);
236 ok_dec(WsaData->iMaxUdpDg, 0);
237 ok_ptr(WsaData->lpVendorInfo, (
PVOID)0x5555555555555555ULL);
239 {
243 }
246 }
247
248
256 sizeof(WsaData->szDescription),
257 "WinSock 2.0",
258 0x55);
259 ok(Okay,
"CheckStringBuffer failed\n");
261 sizeof(WsaData->szSystemStatus),
262 "Running",
263 0x55);
264 ok(Okay,
"CheckStringBuffer failed\n");
265 ok_dec(WsaData->iMaxSockets, 0);
266 ok_dec(WsaData->iMaxUdpDg, 0);
267 ok_ptr(WsaData->lpVendorInfo, (
PVOID)0x5555555555555555ULL);
270 {
278 sizeof(WsaData->szDescription),
279 "WinSock 2.0",
280 0x55);
281 ok(Okay,
"CheckStringBuffer failed\n");
283 sizeof(WsaData->szSystemStatus),
284 "Running",
285 0x55);
286 ok(Okay,
"CheckStringBuffer failed\n");
287 ok_dec(WsaData->iMaxSockets, 32767);
288 ok_dec(WsaData->iMaxUdpDg, 65467);
289 ok_ptr(WsaData->lpVendorInfo, (
PVOID)0x5555555555555555ULL);
291 {
295 }
298 }
299
301}
static BOOLEAN AreLegacyFunctionsSupported(VOID)
static BOOLEAN IsWinsockInitialized(VOID)
static BOOLEAN CheckStringBuffer(PCSTR Buffer, SIZE_T MaximumLength, PCSTR Expected, UCHAR Fill)
#define EndSeh(ExpectedStatus)
static VOID FreeGuarded(_In_ PVOID Pointer)
static PVOID AllocateGuarded(_In_ SIZE_T SizeRequested)
#define ok_hex(expression, result)
#define ok_ptr(expression, result)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
#define FillMemory(BUF, SIZ, MASK)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
#define WSAVERNOTSUPPORTED
int PASCAL FAR WSACleanup(void)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList