ReactOS 0.4.17-dev-934-g091855f
address.c
Go to the documentation of this file.
1/*
2 * DirectPlay8 Address
3 *
4 * Copyright 2004 Raphael Junqueira
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 *
20 */
21
22
23#include <stdarg.h>
24
25#define COBJMACROS
26#include "windef.h"
27#include "winbase.h"
28#include "wingdi.h"
29#include "winuser.h"
30#include "objbase.h"
31
32#include "wine/debug.h"
33
34#include "dpnet_private.h"
35
37
38
40{
41 if(This->comp_count == This->comp_array_size)
42 {
43 struct component **temp;
44
45 temp = realloc(This->components, sizeof(*temp) * This->comp_array_size * 2);
46 if(!temp)
47 {
48 return FALSE;
49 }
50
51 This->comp_array_size *= 2;
52 This->components = temp;
53 }
54
55 This->components[This->comp_count] = item;
56 This->comp_count++;
57
58 return TRUE;
59}
60
61static inline IDirectPlay8AddressImpl *impl_from_IDirectPlay8Address(IDirectPlay8Address *iface)
62{
63 return CONTAINING_RECORD(iface, IDirectPlay8AddressImpl, IDirectPlay8Address_iface);
64}
65
66/* IDirectPlay8Address IUnknown parts follow: */
67static HRESULT WINAPI IDirectPlay8AddressImpl_QueryInterface(IDirectPlay8Address *iface,
68 REFIID riid, void **ppv)
69{
70 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectPlay8Address)) {
71 IUnknown_AddRef(iface);
72 *ppv = iface;
73 return DPN_OK;
74 }
75
76 WARN("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
77 return E_NOINTERFACE;
78}
79
80static ULONG WINAPI IDirectPlay8AddressImpl_AddRef(IDirectPlay8Address *iface)
81{
84
85 TRACE("(%p) ref=%lu\n", This, ref);
86
87 return ref;
88}
89
90static ULONG WINAPI IDirectPlay8AddressImpl_Release(IDirectPlay8Address *iface)
91{
94
95 TRACE("(%p) ref=%lu\n", This, ref);
96
97 if (!ref)
98 {
99 struct component *entry;
100 DWORD i;
101
102 for(i=0; i < This->comp_count; i++)
103 {
104 entry = This->components[i];
105
106 switch(entry->type)
107 {
109 free(entry->data.string);
110 break;
112 free(entry->data.ansi);
113 break;
115 free(entry->data.binary);
116 break;
117 }
118
119 free(entry->name);
120 free(entry);
121 }
122
123 free(This->components);
124 free(This);
125 }
126 return ref;
127}
128
129/* returns name of given GUID */
130static const char *debugstr_SP(const GUID *id) {
131 static const guid_info guids[] = {
132 /* CLSIDs */
133 GE(CLSID_DP8SP_IPX),
134 GE(CLSID_DP8SP_TCPIP),
135 GE(CLSID_DP8SP_SERIAL),
136 GE(CLSID_DP8SP_MODEM)
137 };
138 unsigned int i;
139
140 if (!id) return "(null)";
141
142 for (i = 0; i < ARRAY_SIZE(guids); i++) {
143 if (IsEqualGUID(id, guids[i].guid))
144 return guids[i].name;
145 }
146 /* if we didn't find it, act like standard debugstr_guid */
147 return debugstr_guid(id);
148}
149
150/* IDirectPlay8Address Interface follow: */
151
152static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLW(IDirectPlay8Address *iface,
153 WCHAR *pwszSourceURL)
154{
156 TRACE("(%p, %s): stub\n", This, debugstr_w(pwszSourceURL));
157 return DPN_OK;
158}
159
160static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLA(IDirectPlay8Address *iface,
161 CHAR *pszSourceURL)
162{
164 TRACE("(%p, %s): stub\n", This, pszSourceURL);
165 return DPN_OK;
166}
167
168static HRESULT WINAPI IDirectPlay8AddressImpl_Duplicate(IDirectPlay8Address *iface,
169 IDirectPlay8Address **ppdpaNewAddress)
170{
172 IDirectPlay8Address *dup;
173 HRESULT hr;
174
175 TRACE("(%p, %p)\n", This, ppdpaNewAddress);
176
177 if(!ppdpaNewAddress)
178 return E_POINTER;
179
180 hr = DPNET_CreateDirectPlay8Address(NULL, NULL, &IID_IDirectPlay8Address, (LPVOID*)&dup);
181 if(hr == S_OK)
182 {
184 DWORD i;
185
186 DupThis->SP_guid = This->SP_guid;
187 DupThis->init = This->init;
188
189 for(i=0; i < This->comp_count; i++)
190 {
191 struct component *entry = This->components[i];
192
193 switch (entry->type)
194 {
196 hr = IDirectPlay8Address_AddComponent(dup, entry->name, &entry->data.value, entry->size, entry->type);
197 break;
199 hr = IDirectPlay8Address_AddComponent(dup, entry->name, &entry->data.guid, entry->size, entry->type);
200 break;
202 hr = IDirectPlay8Address_AddComponent(dup, entry->name, entry->data.string, entry->size, entry->type);
203 break;
205 hr = IDirectPlay8Address_AddComponent(dup, entry->name, entry->data.ansi, entry->size, entry->type);
206 break;
208 hr = IDirectPlay8Address_AddComponent(dup, entry->name, entry->data.binary, entry->size, entry->type);
209 break;
210 }
211
212 if(hr != S_OK)
213 {
215 dup = NULL;
216 ERR("Failed to copy component: %s - 0x%08lx\n", debugstr_w(entry->name), hr);
217 break;
218 }
219 }
220
221 *ppdpaNewAddress = dup;
222 }
223
224 return hr;
225}
226
227static HRESULT WINAPI IDirectPlay8AddressImpl_SetEqual(IDirectPlay8Address *iface,
228 IDirectPlay8Address *pdpaAddress)
229{
231 TRACE("(%p, %p): stub\n", This, pdpaAddress);
232 return DPN_OK;
233}
234
235static HRESULT WINAPI IDirectPlay8AddressImpl_IsEqual(IDirectPlay8Address *iface,
236 IDirectPlay8Address *pdpaAddress)
237{
239 TRACE("(%p, %p): stub\n", This, pdpaAddress);
240 return DPN_OK;
241}
242
243static HRESULT WINAPI IDirectPlay8AddressImpl_Clear(IDirectPlay8Address *iface)
244{
246 TRACE("(%p): stub\n", This);
247 return DPN_OK;
248}
249
250static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLW(IDirectPlay8Address *iface, WCHAR *url, DWORD *length)
251{
254 int i;
255 WCHAR buffer[1024];
256 int position = 0;
257
258 TRACE("(%p, %p, %p)\n", This, url, length);
259
260 if(!length || (!url && *length != 0))
262
263 for(i=0; i < This->comp_count; i++)
264 {
265 struct component *entry = This->components[i];
266
267 if (position) buffer[position++] = ';';
268
269 switch(entry->type)
270 {
272 position += swprintf( &buffer[position], ARRAY_SIZE(buffer) - position,
273 L"%s=%%7B%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X%%7D",
274 entry->name, entry->data.guid.Data1, entry->data.guid.Data2, entry->data.guid.Data3,
275 entry->data.guid.Data4[0], entry->data.guid.Data4[1], entry->data.guid.Data4[2],
276 entry->data.guid.Data4[3], entry->data.guid.Data4[4], entry->data.guid.Data4[5],
277 entry->data.guid.Data4[6], entry->data.guid.Data4[7] );
278
279 break;
281 position += swprintf(&buffer[position], ARRAY_SIZE(buffer) - position, L"%s=%s", entry->name, entry->data.string);
282 break;
284 position += swprintf(&buffer[position], ARRAY_SIZE(buffer) - position, L"%s=%ld", entry->name, entry->data.value);
285 break;
287 position += swprintf(&buffer[position], ARRAY_SIZE(buffer) - position, L"%s=%hs", entry->name, entry->data.ansi);
288 break;
290 default:
291 FIXME("Unsupported type %ld\n", entry->type);
292 }
293 }
294 buffer[position] = 0;
295
296 if(url && *length >= lstrlenW(buffer) + lstrlenW(DPNA_HEADER) + 1)
297 {
300 hr = DPN_OK;
301 }
302
304
305 return hr;
306}
307
308static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLA(IDirectPlay8Address *iface, char *url, DWORD *length)
309{
311 HRESULT hr;
312 WCHAR *buffer = NULL;
313
314 TRACE("(%p, %p %p)\n", This, url, length);
315
316 if(!length || (!url && *length != 0))
318
319 if(url && *length)
320 buffer = malloc(*length * sizeof(WCHAR));
321
323 if(hr == DPN_OK)
324 {
325 DWORD size;
327 if(size <= *length)
329 else
330 {
331 *length = size;
333 }
334 }
335 free(buffer);
336 return hr;
337}
338
339static HRESULT WINAPI IDirectPlay8AddressImpl_GetSP(IDirectPlay8Address *iface, GUID *pguidSP)
340{
342
343 TRACE("(%p, %p)\n", iface, pguidSP);
344
345 if(!pguidSP)
347
348 if(!This->init)
349 return DPNERR_DOESNOTEXIST;
350
351 *pguidSP = This->SP_guid;
352 return DPN_OK;
353}
354
355static HRESULT WINAPI IDirectPlay8AddressImpl_GetUserData(IDirectPlay8Address *iface,
356 void *pvUserData, DWORD *pdwBufferSize)
357{
359 TRACE("(%p): stub\n", This);
360 return DPN_OK;
361}
362
363static HRESULT WINAPI IDirectPlay8AddressImpl_SetSP(IDirectPlay8Address *iface,
364 const GUID *const pguidSP)
365{
367
368 TRACE("(%p, %s)\n", iface, debugstr_SP(pguidSP));
369
370 if(!pguidSP)
372
373 This->init = TRUE;
374 This->SP_guid = *pguidSP;
375
377
378 return DPN_OK;
379}
380
381static HRESULT WINAPI IDirectPlay8AddressImpl_SetUserData(IDirectPlay8Address *iface,
382 const void *const pvUserData, const DWORD dwDataSize)
383{
385 TRACE("(%p): stub\n", This);
386 return DPN_OK;
387}
388
390 DWORD *pdwNumComponents)
391{
393 TRACE("(%p): stub\n", This);
394
395 if(!pdwNumComponents)
397
398 *pdwNumComponents = This->comp_count;
399
400 return DPN_OK;
401}
402
404 const WCHAR *const pwszName, void *pvBuffer, DWORD *pdwBufferSize, DWORD *pdwDataType)
405{
407 struct component *entry;
408 DWORD i;
409
410 TRACE("(%p)->(%s %p %p %p)\n", This, debugstr_w(pwszName), pvBuffer, pdwBufferSize, pdwDataType);
411
412 if(!pwszName || !pdwBufferSize || !pdwDataType || (!pvBuffer && *pdwBufferSize))
413 return E_POINTER;
414
415 for(i=0; i < This->comp_count; i++)
416 {
417 entry = This->components[i];
418
419 if (lstrcmpW(pwszName, entry->name) == 0)
420 {
421 TRACE("Found %s\n", debugstr_w(pwszName));
422
423 if(*pdwBufferSize < entry->size)
424 {
425 *pdwBufferSize = entry->size;
427 }
428
429 *pdwBufferSize = entry->size;
430 *pdwDataType = entry->type;
431
432 switch (entry->type)
433 {
435 memcpy(pvBuffer, &entry->data.value, sizeof(DWORD));
436 break;
438 memcpy(pvBuffer, &entry->data.guid, sizeof(GUID));
439 break;
441 memcpy(pvBuffer, entry->data.string, entry->size);
442 break;
444 memcpy(pvBuffer, entry->data.ansi, entry->size);
445 break;
447 memcpy(pvBuffer, entry->data.binary, entry->size);
448 break;
449 }
450
451 return S_OK;
452 }
453 }
454
455 return DPNERR_DOESNOTEXIST;
456}
457
459 const DWORD dwComponentID, WCHAR *pwszName, DWORD *pdwNameLen, void *pvBuffer,
460 DWORD *pdwBufferSize, DWORD *pdwDataType)
461{
463 struct component *entry;
464 int namesize;
465
466 TRACE("(%p)->(%lu %p %p %p %p %p)\n", This, dwComponentID, pwszName, pdwNameLen, pvBuffer, pdwBufferSize, pdwDataType);
467
468 if(!pdwNameLen || !pdwBufferSize || !pdwDataType)
469 {
470 WARN("Invalid buffer (%p, %p, %p)\n", pdwNameLen, pdwBufferSize, pdwDataType);
472 }
473
474 if(dwComponentID > This->comp_count)
475 {
476 WARN("dwComponentID out of range\n");
477 return DPNERR_DOESNOTEXIST;
478 }
479
480 entry = This->components[dwComponentID];
481
482 namesize = lstrlenW(entry->name);
483 if(*pdwBufferSize < entry->size || *pdwNameLen < namesize)
484 {
485 WARN("Buffer too small\n");
486
487 *pdwNameLen = namesize + 1;
488 *pdwBufferSize = entry->size;
489 *pdwDataType = entry->type;
491 }
492
493 if(!pwszName || !pvBuffer)
494 {
495 WARN("Invalid buffer (%p, %p)\n", pwszName, pvBuffer);
497 }
498
499 lstrcpyW(pwszName, entry->name);
500
501 *pdwNameLen = namesize + 1;
502 *pdwBufferSize = entry->size;
503 *pdwDataType = entry->type;
504
505 switch (entry->type)
506 {
508 *(DWORD*)pvBuffer = entry->data.value;
509 break;
511 *(GUID*)pvBuffer = entry->data.guid;
512 break;
514 memcpy(pvBuffer, entry->data.string, entry->size);
515 break;
517 memcpy(pvBuffer, entry->data.ansi, entry->size);
518 break;
520 memcpy(pvBuffer, entry->data.binary, entry->size);
521 break;
522 }
523
524 return S_OK;
525}
526
527static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *iface,
528 const WCHAR *const pwszName, const void* const lpvData, const DWORD dwDataSize,
529 const DWORD dwDataType)
530{
532 struct component *entry;
533 BOOL found = FALSE;
534 DWORD i;
535
536 TRACE("(%p, %s, %p, %lu, %lx)\n", This, debugstr_w(pwszName), lpvData, dwDataSize, dwDataType);
537
538 if (NULL == lpvData)
540
541 switch (dwDataType)
542 {
544 if (sizeof(DWORD) != dwDataSize)
545 {
546 WARN("Invalid DWORD size, returning DPNERR_INVALIDPARAM\n");
547 return DPNERR_INVALIDPARAM;
548 }
549 break;
551 if (sizeof(GUID) != dwDataSize)
552 {
553 WARN("Invalid GUID size, returning DPNERR_INVALIDPARAM\n");
554 return DPNERR_INVALIDPARAM;
555 }
556 break;
558 if (((lstrlenW((WCHAR*)lpvData)+1)*sizeof(WCHAR)) != dwDataSize)
559 {
560 WARN("Invalid STRING size, returning DPNERR_INVALIDPARAM\n");
561 return DPNERR_INVALIDPARAM;
562 }
563 break;
565 if ((strlen((const CHAR*)lpvData)+1) != dwDataSize)
566 {
567 WARN("Invalid ANSI size, returning DPNERR_INVALIDPARAM\n");
568 return DPNERR_INVALIDPARAM;
569 }
570 break;
571 }
572
573 for(i=0; i < This->comp_count; i++)
574 {
575 entry = This->components[i];
576
577 if (lstrcmpW(pwszName, entry->name) == 0)
578 {
579 TRACE("Found %s\n", debugstr_w(pwszName));
580 found = TRUE;
581
583 free(entry->data.ansi);
584 else if(entry->type == DPNA_DATATYPE_STRING)
585 free(entry->data.string);
586 else if(entry->type == DPNA_DATATYPE_BINARY)
587 free(entry->data.binary);
588
589 break;
590 }
591 }
592
593 if(!found)
594 {
595 /* Create a new one */
596 entry = malloc(sizeof(struct component));
597 if(!entry)
598 return E_OUTOFMEMORY;
599
600 entry->name = wcsdup(pwszName);
601 if(!entry->name)
602 {
603 free(entry);
604 return E_OUTOFMEMORY;
605 }
606
608 {
609 free(entry->name);
610 free(entry);
611 return E_OUTOFMEMORY;
612 }
613 }
614
615 switch (dwDataType)
616 {
618 entry->data.value = *(DWORD*)lpvData;
619 TRACE("(%p, %lu): DWORD Type -> %lu\n", lpvData, dwDataSize, *(const DWORD*) lpvData);
620 break;
622 entry->data.guid = *(GUID*)lpvData;
623 TRACE("(%p, %lu): GUID Type -> %s\n", lpvData, dwDataSize, debugstr_guid(lpvData));
624 break;
626 entry->data.string = wcsdup((WCHAR*)lpvData);
627 TRACE("(%p, %lu): STRING Type -> %s\n", lpvData, dwDataSize, debugstr_w((WCHAR*)lpvData));
628 break;
630 entry->data.ansi = strdup((char*)lpvData);
631 TRACE("(%p, %lu): ANSI STRING Type -> %s\n", lpvData, dwDataSize, (const CHAR*) lpvData);
632 break;
634 entry->data.binary = malloc(dwDataSize);
635 memcpy(entry->data.binary, lpvData, dwDataSize);
636 TRACE("(%p, %lu): BINARY Type\n", lpvData, dwDataSize);
637 break;
638 }
639
640 entry->type = dwDataType;
641 entry->size = dwDataSize;
642
643 return DPN_OK;
644}
645
646static HRESULT WINAPI IDirectPlay8AddressImpl_GetDevice(IDirectPlay8Address *iface, GUID *pDevGuid) {
648 TRACE("(%p): stub\n", This);
649 return DPN_OK;
650}
651
652static HRESULT WINAPI IDirectPlay8AddressImpl_SetDevice(IDirectPlay8Address *iface,
653 const GUID *const devGuid)
654{
656 TRACE("(%p, %s): stub\n", This, debugstr_guid(devGuid));
657 return DPN_OK;
658}
659
661 void *pvAddress, DWORD dwDataSize)
662{
664 TRACE("(%p): stub\n", This);
665 return DPN_OK;
666}
667
668static const IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl =
669{
692};
693
695{
697 HRESULT ret;
698
699 TRACE("(%p, %s, %p)\n", pUnkOuter, debugstr_guid(riid), ppobj);
700
701 *ppobj = NULL;
702
704 if (!client)
705 return E_OUTOFMEMORY;
706
707 client->IDirectPlay8Address_iface.lpVtbl = &DirectPlay8Address_Vtbl;
708 client->ref = 1;
709 client->comp_array_size = 4;
710 client->components = malloc(sizeof(*client->components) * client->comp_array_size);
711 if(!client->components)
712 {
713 free(client);
714 return E_OUTOFMEMORY;
715 }
716
717 ret = IDirectPlay8AddressImpl_QueryInterface(&client->IDirectPlay8Address_iface, riid, ppobj);
718 IDirectPlay8AddressImpl_Release(&client->IDirectPlay8Address_iface);
719
720 return ret;
721}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HRESULT WINAPI IDirectPlay8AddressImpl_SetSP(IDirectPlay8Address *iface, const GUID *const pguidSP)
Definition: address.c:363
static HRESULT WINAPI IDirectPlay8AddressImpl_Duplicate(IDirectPlay8Address *iface, IDirectPlay8Address **ppdpaNewAddress)
Definition: address.c:168
static IDirectPlay8AddressImpl * impl_from_IDirectPlay8Address(IDirectPlay8Address *iface)
Definition: address.c:61
static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLW(IDirectPlay8Address *iface, WCHAR *pwszSourceURL)
Definition: address.c:152
static const IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl
Definition: address.c:668
static ULONG WINAPI IDirectPlay8AddressImpl_AddRef(IDirectPlay8Address *iface)
Definition: address.c:80
static const char * debugstr_SP(const GUID *id)
Definition: address.c:130
static HRESULT WINAPI IDirectPlay8AddressImpl_GetUserData(IDirectPlay8Address *iface, void *pvUserData, DWORD *pdwBufferSize)
Definition: address.c:355
static ULONG WINAPI IDirectPlay8AddressImpl_Release(IDirectPlay8Address *iface)
Definition: address.c:90
static BOOL add_component(IDirectPlay8AddressImpl *This, struct component *item)
Definition: address.c:39
static HRESULT WINAPI IDirectPlay8AddressImpl_GetComponentByName(IDirectPlay8Address *iface, const WCHAR *const pwszName, void *pvBuffer, DWORD *pdwBufferSize, DWORD *pdwDataType)
Definition: address.c:403
static HRESULT WINAPI IDirectPlay8AddressImpl_IsEqual(IDirectPlay8Address *iface, IDirectPlay8Address *pdpaAddress)
Definition: address.c:235
static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *iface, const WCHAR *const pwszName, const void *const lpvData, const DWORD dwDataSize, const DWORD dwDataType)
Definition: address.c:527
static HRESULT WINAPI IDirectPlay8AddressImpl_SetEqual(IDirectPlay8Address *iface, IDirectPlay8Address *pdpaAddress)
Definition: address.c:227
static HRESULT WINAPI IDirectPlay8AddressImpl_SetDevice(IDirectPlay8Address *iface, const GUID *const devGuid)
Definition: address.c:652
static HRESULT WINAPI IDirectPlay8AddressImpl_QueryInterface(IDirectPlay8Address *iface, REFIID riid, void **ppv)
Definition: address.c:67
static HRESULT WINAPI IDirectPlay8AddressImpl_GetDevice(IDirectPlay8Address *iface, GUID *pDevGuid)
Definition: address.c:646
static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromDirectPlay4Address(IDirectPlay8Address *iface, void *pvAddress, DWORD dwDataSize)
Definition: address.c:660
static HRESULT WINAPI IDirectPlay8AddressImpl_GetComponentByIndex(IDirectPlay8Address *iface, const DWORD dwComponentID, WCHAR *pwszName, DWORD *pdwNameLen, void *pvBuffer, DWORD *pdwBufferSize, DWORD *pdwDataType)
Definition: address.c:458
static HRESULT WINAPI IDirectPlay8AddressImpl_GetSP(IDirectPlay8Address *iface, GUID *pguidSP)
Definition: address.c:339
static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLA(IDirectPlay8Address *iface, char *url, DWORD *length)
Definition: address.c:308
static HRESULT WINAPI IDirectPlay8AddressImpl_SetUserData(IDirectPlay8Address *iface, const void *const pvUserData, const DWORD dwDataSize)
Definition: address.c:381
static HRESULT WINAPI IDirectPlay8AddressImpl_Clear(IDirectPlay8Address *iface)
Definition: address.c:243
static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLW(IDirectPlay8Address *iface, WCHAR *url, DWORD *length)
Definition: address.c:250
static HRESULT WINAPI IDirectPlay8AddressImpl_GetNumComponents(IDirectPlay8Address *iface, DWORD *pdwNumComponents)
Definition: address.c:389
static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLA(IDirectPlay8Address *iface, CHAR *pszSourceURL)
Definition: address.c:160
HRESULT DPNET_CreateDirectPlay8Address(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, LPVOID *ppobj)
Definition: address.c:694
#define CP_ACP
Definition: compat.h:109
#define lstrcpyW
Definition: compat.h:749
#define WideCharToMultiByte
Definition: compat.h:111
#define lstrlenW
Definition: compat.h:750
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
const struct sortguid * guids
Definition: locale.c:422
GUID guid
Definition: version.c:147
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
static char * strdup(const char *buf)
Definition: string.h:83
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
#define swprintf
Definition: precomp.h:40
#define DPNA_DATATYPE_STRING_ANSI
Definition: dpaddr.h:41
static const WCHAR DPNA_KEY_PROVIDER[]
Definition: dpaddr.h:140
#define DPNA_DATATYPE_GUID
Definition: dpaddr.h:39
#define IDirectPlay8Address_Release(p)
Definition: dpaddr.h:222
#define IDirectPlay8Address_GetURLW(p, a, b)
Definition: dpaddr.h:230
#define DPNA_DATATYPE_BINARY
Definition: dpaddr.h:40
#define IDirectPlay8Address_AddComponent(p, a, b, c, d)
Definition: dpaddr.h:239
#define DPNA_DATATYPE_DWORD
Definition: dpaddr.h:38
static const WCHAR DPNA_HEADER[]
Definition: dpaddr.h:128
#define DPNA_DATATYPE_STRING
Definition: dpaddr.h:37
#define DPNERR_INVALIDPARAM
Definition: dplay8.h:77
#define DPN_OK
Definition: dplay8.h:75
#define DPNERR_INVALIDPOINTER
Definition: dplay8.h:81
#define DPNERR_DOESNOTEXIST
Definition: dplay8.h:99
#define DPNERR_BUFFERTOOSMALL
Definition: dplay8.h:90
#define GE(x)
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
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
Definition: glfuncs.h:248
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define dup
Definition: syshdrs.h:51
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static const WCHAR url[]
Definition: encode.c:1384
short WCHAR
Definition: pedump.c:58
char CHAR
Definition: pedump.c:57
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define calloc
Definition: rosglue.h:14
static calc_node_t temp
Definition: rpn_ieee.c:38
static FILE * client
Definition: client.c:37
#define TRACE(s)
Definition: solgame.cpp:4
Definition: name.c:39
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480