TESTING -- override pthreads to fix gstreamer v5
[wine/multimedia.git] / dlls / dpnet / address.c
blobd87d4e7bef13a4e782b8409903a6d8be908b5c36
1 /*
2 * DirectPlay8 Address
3 *
4 * Copyright 2004 Raphael Junqueira
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.
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.
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
22 #include "config.h"
24 #include <stdarg.h>
26 #define COBJMACROS
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wingdi.h"
30 #include "winuser.h"
31 #include "objbase.h"
33 #include "wine/unicode.h"
34 #include "wine/debug.h"
36 #include "dplay8.h"
37 #include "dpnet_private.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(dpnet);
42 static inline void *heap_alloc(size_t len)
44 return HeapAlloc(GetProcessHeap(), 0, len);
47 static inline void *heap_realloc(void *mem, size_t len)
49 return HeapReAlloc( GetProcessHeap(), 0, mem, len);
52 static inline BOOL heap_free(void *mem)
54 return HeapFree(GetProcessHeap(), 0, mem);
57 static inline LPWSTR heap_strdupW(LPCWSTR str)
59 LPWSTR ret = NULL;
61 if(str) {
62 DWORD size;
64 size = (strlenW(str)+1)*sizeof(WCHAR);
65 ret = heap_alloc(size);
66 if(ret)
67 memcpy(ret, str, size);
70 return ret;
73 static char *heap_strdupA( const char *str )
75 char *ret;
77 if (!str) return NULL;
78 if ((ret = HeapAlloc( GetProcessHeap(), 0, strlen(str) + 1 ))) strcpy( ret, str );
79 return ret;
82 static BOOL add_component(IDirectPlay8AddressImpl *This, struct component *item)
84 if(This->comp_count == This->comp_array_size)
86 struct component **temp;
88 temp = heap_realloc(This->components, sizeof(*temp) * This->comp_array_size * 2 );
89 if(!temp)
91 return FALSE;
94 This->comp_array_size *= 2;
95 This->components = temp;
98 This->components[This->comp_count] = item;
99 This->comp_count++;
101 return TRUE;
104 static inline IDirectPlay8AddressImpl *impl_from_IDirectPlay8Address(IDirectPlay8Address *iface)
106 return CONTAINING_RECORD(iface, IDirectPlay8AddressImpl, IDirectPlay8Address_iface);
109 /* IDirectPlay8Address IUnknown parts follow: */
110 static HRESULT WINAPI IDirectPlay8AddressImpl_QueryInterface(IDirectPlay8Address *iface,
111 REFIID riid, void **ppv)
113 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectPlay8Address)) {
114 IUnknown_AddRef(iface);
115 *ppv = iface;
116 return DPN_OK;
119 WARN("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
120 return E_NOINTERFACE;
123 static ULONG WINAPI IDirectPlay8AddressImpl_AddRef(IDirectPlay8Address *iface)
125 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
126 ULONG ref = InterlockedIncrement(&This->ref);
128 TRACE("(%p) ref=%u\n", This, ref);
130 return ref;
133 static ULONG WINAPI IDirectPlay8AddressImpl_Release(IDirectPlay8Address *iface)
135 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
136 ULONG ref = InterlockedDecrement(&This->ref);
138 TRACE("(%p) ref=%u\n", This, ref);
140 if (!ref)
142 struct component *entry;
143 DWORD i;
145 for(i=0; i < This->comp_count; i++)
147 entry = This->components[i];
149 switch(entry->type)
151 case DPNA_DATATYPE_STRING:
152 heap_free(entry->data.string);
153 break;
154 case DPNA_DATATYPE_STRING_ANSI:
155 heap_free(entry->data.ansi);
156 break;
157 case DPNA_DATATYPE_BINARY:
158 heap_free(entry->data.binary);
159 break;
162 heap_free(entry->name);
163 heap_free(entry);
166 heap_free(This->components);
167 heap_free(This);
169 return ref;
172 /* returns name of given GUID */
173 static const char *debugstr_SP(const GUID *id) {
174 static const guid_info guids[] = {
175 /* CLSIDs */
176 GE(CLSID_DP8SP_IPX),
177 GE(CLSID_DP8SP_TCPIP),
178 GE(CLSID_DP8SP_SERIAL),
179 GE(CLSID_DP8SP_MODEM)
181 unsigned int i;
183 if (!id) return "(null)";
185 for (i = 0; i < sizeof(guids)/sizeof(guids[0]); i++) {
186 if (IsEqualGUID(id, guids[i].guid))
187 return guids[i].name;
189 /* if we didn't find it, act like standard debugstr_guid */
190 return debugstr_guid(id);
193 /* IDirectPlay8Address Interface follow: */
195 static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLW(IDirectPlay8Address *iface,
196 WCHAR *pwszSourceURL)
198 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
199 TRACE("(%p, %s): stub\n", This, debugstr_w(pwszSourceURL));
200 return DPN_OK;
203 static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromURLA(IDirectPlay8Address *iface,
204 CHAR *pszSourceURL)
206 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
207 TRACE("(%p, %s): stub\n", This, pszSourceURL);
208 return DPN_OK;
211 static HRESULT WINAPI IDirectPlay8AddressImpl_Duplicate(IDirectPlay8Address *iface,
212 IDirectPlay8Address **ppdpaNewAddress)
214 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
215 IDirectPlay8Address *dup;
216 HRESULT hr;
218 TRACE("(%p, %p)\n", This, ppdpaNewAddress);
220 if(!ppdpaNewAddress)
221 return E_POINTER;
223 hr = DPNET_CreateDirectPlay8Address(NULL, NULL, &IID_IDirectPlay8Address, (LPVOID*)&dup);
224 if(hr == S_OK)
226 IDirectPlay8AddressImpl *DupThis = impl_from_IDirectPlay8Address(dup);
227 DWORD i;
229 DupThis->SP_guid = This->SP_guid;
230 DupThis->init = This->init;
232 for(i=0; i < This->comp_count; i++)
234 struct component *entry = This->components[i];
236 switch (entry->type)
238 case DPNA_DATATYPE_DWORD:
239 hr = IDirectPlay8Address_AddComponent(dup, entry->name, &entry->data.value, entry->size, entry->type);
240 break;
241 case DPNA_DATATYPE_GUID:
242 hr = IDirectPlay8Address_AddComponent(dup, entry->name, &entry->data.guid, entry->size, entry->type);
243 break;
244 case DPNA_DATATYPE_STRING:
245 hr = IDirectPlay8Address_AddComponent(dup, entry->name, entry->data.string, entry->size, entry->type);
246 break;
247 case DPNA_DATATYPE_STRING_ANSI:
248 hr = IDirectPlay8Address_AddComponent(dup, entry->name, entry->data.ansi, entry->size, entry->type);
249 break;
250 case DPNA_DATATYPE_BINARY:
251 hr = IDirectPlay8Address_AddComponent(dup, entry->name, entry->data.binary, entry->size, entry->type);
252 break;
255 if(hr != S_OK)
257 IDirectPlay8Address_Release(dup);
258 dup = NULL;
259 ERR("Failed to copy component: %s - 0x%08x\n", debugstr_w(entry->name), hr);
260 break;
264 *ppdpaNewAddress = dup;
267 return hr;
270 static HRESULT WINAPI IDirectPlay8AddressImpl_SetEqual(IDirectPlay8Address *iface,
271 IDirectPlay8Address *pdpaAddress)
273 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
274 TRACE("(%p, %p): stub\n", This, pdpaAddress);
275 return DPN_OK;
278 static HRESULT WINAPI IDirectPlay8AddressImpl_IsEqual(IDirectPlay8Address *iface,
279 IDirectPlay8Address *pdpaAddress)
281 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
282 TRACE("(%p, %p): stub\n", This, pdpaAddress);
283 return DPN_OK;
286 static HRESULT WINAPI IDirectPlay8AddressImpl_Clear(IDirectPlay8Address *iface)
288 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
289 TRACE("(%p): stub\n", This);
290 return DPN_OK;
293 static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLW(IDirectPlay8Address *iface, WCHAR *pwszURL,
294 DWORD *pdwNumChars)
296 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
297 TRACE("(%p): stub\n", This);
298 return DPN_OK;
301 static HRESULT WINAPI IDirectPlay8AddressImpl_GetURLA(IDirectPlay8Address *iface, CHAR *pszURL,
302 DWORD *pdwNumChars)
304 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
305 TRACE("(%p): stub\n", This);
306 return DPN_OK;
309 static HRESULT WINAPI IDirectPlay8AddressImpl_GetSP(IDirectPlay8Address *iface, GUID *pguidSP)
311 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
313 TRACE("(%p, %p)\n", iface, pguidSP);
315 if(!pguidSP)
316 return DPNERR_INVALIDPOINTER;
318 if(!This->init)
319 return DPNERR_DOESNOTEXIST;
321 *pguidSP = This->SP_guid;
322 return DPN_OK;
325 static HRESULT WINAPI IDirectPlay8AddressImpl_GetUserData(IDirectPlay8Address *iface,
326 void *pvUserData, DWORD *pdwBufferSize)
328 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
329 TRACE("(%p): stub\n", This);
330 return DPN_OK;
333 static HRESULT WINAPI IDirectPlay8AddressImpl_SetSP(IDirectPlay8Address *iface,
334 const GUID *const pguidSP)
336 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
338 TRACE("(%p, %s)\n", iface, debugstr_SP(pguidSP));
340 if(!pguidSP)
341 return DPNERR_INVALIDPOINTER;
343 This->init = TRUE;
344 This->SP_guid = *pguidSP;
346 IDirectPlay8Address_AddComponent(iface, DPNA_KEY_PROVIDER, &This->SP_guid, sizeof(GUID), DPNA_DATATYPE_GUID);
348 return DPN_OK;
351 static HRESULT WINAPI IDirectPlay8AddressImpl_SetUserData(IDirectPlay8Address *iface,
352 const void *const pvUserData, const DWORD dwDataSize)
354 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
355 TRACE("(%p): stub\n", This);
356 return DPN_OK;
359 static HRESULT WINAPI IDirectPlay8AddressImpl_GetNumComponents(IDirectPlay8Address *iface,
360 DWORD *pdwNumComponents)
362 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
363 TRACE("(%p): stub\n", This);
365 if(!pdwNumComponents)
366 return DPNERR_INVALIDPOINTER;
368 *pdwNumComponents = This->comp_count;
370 return DPN_OK;
373 static HRESULT WINAPI IDirectPlay8AddressImpl_GetComponentByName(IDirectPlay8Address *iface,
374 const WCHAR *const pwszName, void *pvBuffer, DWORD *pdwBufferSize, DWORD *pdwDataType)
376 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
377 struct component *entry;
378 DWORD i;
380 TRACE("(%p)->(%p %p %p %p)\n", This, pwszName, pvBuffer, pdwBufferSize, pdwDataType);
382 if(!pwszName || !pdwBufferSize || !pdwDataType || (!pvBuffer && pdwBufferSize))
383 return E_POINTER;
385 for(i=0; i < This->comp_count; i++)
387 entry = This->components[i];
389 if (lstrcmpW(pwszName, entry->name) == 0)
391 TRACE("Found %s\n", debugstr_w(pwszName));
393 if(*pdwBufferSize < entry->size)
395 *pdwBufferSize = entry->size;
396 return DPNERR_BUFFERTOOSMALL;
399 *pdwBufferSize = entry->size;
400 *pdwDataType = entry->type;
402 switch (entry->type)
404 case DPNA_DATATYPE_DWORD:
405 memcpy(pvBuffer, &entry->data.value, sizeof(DWORD));
406 break;
407 case DPNA_DATATYPE_GUID:
408 memcpy(pvBuffer, &entry->data.guid, sizeof(GUID));
409 break;
410 case DPNA_DATATYPE_STRING:
411 memcpy(pvBuffer, entry->data.string, entry->size);
412 break;
413 case DPNA_DATATYPE_STRING_ANSI:
414 memcpy(pvBuffer, entry->data.ansi, entry->size);
415 break;
416 case DPNA_DATATYPE_BINARY:
417 memcpy(pvBuffer, entry->data.binary, entry->size);
418 break;
421 return S_OK;
425 return DPNERR_DOESNOTEXIST;
428 static HRESULT WINAPI IDirectPlay8AddressImpl_GetComponentByIndex(IDirectPlay8Address *iface,
429 const DWORD dwComponentID, WCHAR *pwszName, DWORD *pdwNameLen, void *pvBuffer,
430 DWORD *pdwBufferSize, DWORD *pdwDataType)
432 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
433 struct component *entry;
434 int namesize;
436 TRACE("(%p)->(%u %p %p %p %p %p)\n", This, dwComponentID, pwszName, pdwNameLen, pvBuffer, pdwBufferSize, pdwDataType);
438 if(!pdwNameLen || !pdwBufferSize || !pdwDataType)
440 WARN("Invalid buffer (%p, %p, %p)\n", pdwNameLen, pdwBufferSize, pdwDataType);
441 return DPNERR_INVALIDPOINTER;
444 if(dwComponentID > This->comp_count)
446 WARN("dwComponentID out of range\n");
447 return DPNERR_DOESNOTEXIST;
450 entry = This->components[dwComponentID];
452 namesize = strlenW(entry->name);
453 if(*pdwBufferSize < entry->size || *pdwNameLen < namesize)
455 WARN("Buffer too small\n");
457 *pdwNameLen = namesize + 1;
458 *pdwBufferSize = entry->size;
459 *pdwDataType = entry->type;
460 return DPNERR_BUFFERTOOSMALL;
463 if(!pwszName || !pvBuffer)
465 WARN("Invalid buffer (%p, %p)\n", pwszName, pvBuffer);
466 return DPNERR_INVALIDPOINTER;
469 lstrcpyW(pwszName, entry->name);
471 *pdwNameLen = namesize + 1;
472 *pdwBufferSize = entry->size;
473 *pdwDataType = entry->type;
475 switch (entry->type)
477 case DPNA_DATATYPE_DWORD:
478 *(DWORD*)pvBuffer = entry->data.value;
479 break;
480 case DPNA_DATATYPE_GUID:
481 *(GUID*)pvBuffer = entry->data.guid;
482 break;
483 case DPNA_DATATYPE_STRING:
484 memcpy(pvBuffer, entry->data.string, entry->size);
485 break;
486 case DPNA_DATATYPE_STRING_ANSI:
487 memcpy(pvBuffer, entry->data.ansi, entry->size);
488 break;
489 case DPNA_DATATYPE_BINARY:
490 memcpy(pvBuffer, entry->data.binary, entry->size);
491 break;
494 return S_OK;
497 static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *iface,
498 const WCHAR *const pwszName, const void* const lpvData, const DWORD dwDataSize,
499 const DWORD dwDataType)
501 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
502 struct component *entry;
503 BOOL found = FALSE;
504 DWORD i;
506 TRACE("(%p, %s, %p, %u, %x)\n", This, debugstr_w(pwszName), lpvData, dwDataSize, dwDataType);
508 if (NULL == lpvData)
509 return DPNERR_INVALIDPOINTER;
511 switch (dwDataType)
513 case DPNA_DATATYPE_DWORD:
514 if (sizeof(DWORD) != dwDataSize)
516 WARN("Invalid DWORD size, returning DPNERR_INVALIDPARAM\n");
517 return DPNERR_INVALIDPARAM;
519 break;
520 case DPNA_DATATYPE_GUID:
521 if (sizeof(GUID) != dwDataSize)
523 WARN("Invalid GUID size, returning DPNERR_INVALIDPARAM\n");
524 return DPNERR_INVALIDPARAM;
526 break;
527 case DPNA_DATATYPE_STRING:
528 if (((strlenW((WCHAR*)lpvData)+1)*sizeof(WCHAR)) != dwDataSize)
530 WARN("Invalid STRING size, returning DPNERR_INVALIDPARAM\n");
531 return DPNERR_INVALIDPARAM;
533 break;
534 case DPNA_DATATYPE_STRING_ANSI:
535 if ((strlen((const CHAR*)lpvData)+1) != dwDataSize)
537 WARN("Invalid ASCII size, returning DPNERR_INVALIDPARAM\n");
538 return DPNERR_INVALIDPARAM;
540 break;
543 for(i=0; i < This->comp_count; i++)
545 entry = This->components[i];
547 if (lstrcmpW(pwszName, entry->name) == 0)
549 TRACE("Found %s\n", debugstr_w(pwszName));
550 found = TRUE;
552 if(entry->type == DPNA_DATATYPE_STRING_ANSI)
553 heap_free(entry->data.ansi);
554 else if(entry->type == DPNA_DATATYPE_STRING)
555 heap_free(entry->data.string);
556 else if(entry->type == DPNA_DATATYPE_BINARY)
557 heap_free(entry->data.binary);
559 break;
563 if(!found)
565 /* Create a new one */
566 entry = heap_alloc(sizeof(struct component));
567 if(!entry)
568 return E_OUTOFMEMORY;
570 entry->name = heap_strdupW(pwszName);
571 if(!entry->name)
573 heap_free(entry);
574 return E_OUTOFMEMORY;
577 if(!add_component(This, entry))
579 heap_free(entry->name);
580 heap_free(entry);
581 return E_OUTOFMEMORY;
585 switch (dwDataType)
587 case DPNA_DATATYPE_DWORD:
588 entry->data.value = *(DWORD*)lpvData;
589 TRACE("(%p, %u): DWORD Type -> %u\n", lpvData, dwDataSize, *(const DWORD*) lpvData);
590 break;
591 case DPNA_DATATYPE_GUID:
592 entry->data.guid = *(GUID*)lpvData;
593 TRACE("(%p, %u): GUID Type -> %s\n", lpvData, dwDataSize, debugstr_guid(lpvData));
594 break;
595 case DPNA_DATATYPE_STRING:
596 entry->data.string = heap_strdupW((WCHAR*)lpvData);
597 TRACE("(%p, %u): STRING Type -> %s\n", lpvData, dwDataSize, debugstr_w((WCHAR*)lpvData));
598 break;
599 case DPNA_DATATYPE_STRING_ANSI:
600 entry->data.ansi = heap_strdupA((CHAR*)lpvData);
601 TRACE("(%p, %u): ANSI STRING Type -> %s\n", lpvData, dwDataSize, (const CHAR*) lpvData);
602 break;
603 case DPNA_DATATYPE_BINARY:
604 entry->data.binary = heap_alloc(dwDataSize);
605 memcpy(entry->data.binary, lpvData, dwDataSize);
606 TRACE("(%p, %u): BINARY Type\n", lpvData, dwDataSize);
607 break;
610 entry->type = dwDataType;
611 entry->size = dwDataSize;
613 return DPN_OK;
616 static HRESULT WINAPI IDirectPlay8AddressImpl_GetDevice(IDirectPlay8Address *iface, GUID *pDevGuid) {
617 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
618 TRACE("(%p): stub\n", This);
619 return DPN_OK;
622 static HRESULT WINAPI IDirectPlay8AddressImpl_SetDevice(IDirectPlay8Address *iface,
623 const GUID *const devGuid)
625 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
626 TRACE("(%p, %s): stub\n", This, debugstr_guid(devGuid));
627 return DPN_OK;
630 static HRESULT WINAPI IDirectPlay8AddressImpl_BuildFromDirectPlay4Address(IDirectPlay8Address *iface,
631 void *pvAddress, DWORD dwDataSize)
633 IDirectPlay8AddressImpl *This = impl_from_IDirectPlay8Address(iface);
634 TRACE("(%p): stub\n", This);
635 return DPN_OK;
638 static const IDirectPlay8AddressVtbl DirectPlay8Address_Vtbl =
640 IDirectPlay8AddressImpl_QueryInterface,
641 IDirectPlay8AddressImpl_AddRef,
642 IDirectPlay8AddressImpl_Release,
643 IDirectPlay8AddressImpl_BuildFromURLW,
644 IDirectPlay8AddressImpl_BuildFromURLA,
645 IDirectPlay8AddressImpl_Duplicate,
646 IDirectPlay8AddressImpl_SetEqual,
647 IDirectPlay8AddressImpl_IsEqual,
648 IDirectPlay8AddressImpl_Clear,
649 IDirectPlay8AddressImpl_GetURLW,
650 IDirectPlay8AddressImpl_GetURLA,
651 IDirectPlay8AddressImpl_GetSP,
652 IDirectPlay8AddressImpl_GetUserData,
653 IDirectPlay8AddressImpl_SetSP,
654 IDirectPlay8AddressImpl_SetUserData,
655 IDirectPlay8AddressImpl_GetNumComponents,
656 IDirectPlay8AddressImpl_GetComponentByName,
657 IDirectPlay8AddressImpl_GetComponentByIndex,
658 IDirectPlay8AddressImpl_AddComponent,
659 IDirectPlay8AddressImpl_GetDevice,
660 IDirectPlay8AddressImpl_SetDevice,
661 IDirectPlay8AddressImpl_BuildFromDirectPlay4Address
664 HRESULT DPNET_CreateDirectPlay8Address(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, LPVOID *ppobj)
666 IDirectPlay8AddressImpl* client;
667 HRESULT ret;
669 TRACE("(%p, %s, %p)\n", pUnkOuter, debugstr_guid(riid), ppobj);
671 *ppobj = NULL;
673 client = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectPlay8AddressImpl));
674 if (!client)
675 return E_OUTOFMEMORY;
677 client->IDirectPlay8Address_iface.lpVtbl = &DirectPlay8Address_Vtbl;
678 client->ref = 1;
679 client->comp_array_size = 4;
680 client->components = heap_alloc( sizeof(*client->components) * client->comp_array_size );
681 if(!client->components)
683 heap_free(client);
684 return E_OUTOFMEMORY;
687 ret = IDirectPlay8AddressImpl_QueryInterface(&client->IDirectPlay8Address_iface, riid, ppobj);
688 IDirectPlay8AddressImpl_Release(&client->IDirectPlay8Address_iface);
690 return ret;