ReactOS 0.4.17-dev-966-gf06eace
dplayx_global.c
Go to the documentation of this file.
1/* dplayx.dll global data implementation.
2 *
3 * Copyright 1999,2000 - Peter Hunnisett
4 *
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 * NOTES:
22 * o Implementation of all things which are associated with dplay on
23 * the computer - i.e. shared resources and such. Methods in this
24 * compilation unit should not call anything outside of this unit
25 * except base windows services and an interface to start the
26 * messaging thread.
27 * o Methods that begin with DPLAYX_ are used for dealing with
28 * dplayx.dll data which is accessible from all processes.
29 *
30 */
31
32#include <stdarg.h>
33#include <string.h>
34
35#include "wine/debug.h"
36#include "windef.h"
37#include "winbase.h"
38#include "winerror.h"
39
40#include "wingdi.h"
41#include "winuser.h"
42
43#include "dplayx_global.h"
44#include "dplayx_messages.h" /* For CreateMessageReceptionThread only */
45
47
48/* FIXME: Need to do all that fun other dll referencing type of stuff */
49
50/* Static data for all processes */
51static const char lpszDplayxSemaName[] = "WINE_DPLAYX_SM";
53
54static const char lpszDplayxFileMapping[] = "WINE_DPLAYX_FM";
56
58
59
60#define DPLAYX_AcquireSemaphore() TRACE( "Waiting for DPLAYX semaphore\n" ); \
61 WaitForSingleObject( hDplayxSema, INFINITE );\
62 TRACE( "Through wait\n" )
63
64#define DPLAYX_ReleaseSemaphore() ReleaseSemaphore( hDplayxSema, 1, NULL ); \
65 TRACE( "DPLAYX Semaphore released\n" ) /* FIXME: Is this correct? */
66
67
68/* HACK for simple global data right now */
69#define dwStaticSharedSize (128 * 1024) /* 128 KBytes */
70#define dwDynamicSharedSize (512 * 1024) /* 512 KBytes */
71#define dwTotalSharedSize ( dwStaticSharedSize + dwDynamicSharedSize )
72
73
74/* FIXME: Is there no easier way? */
75
76/* Pretend the entire dynamic area is carved up into 512 byte blocks.
77 * Each block has 4 bytes which are 0 unless used */
78#define dwBlockSize 512
79#define dwMaxBlock (dwDynamicSharedSize/dwBlockSize)
80
81typedef struct
82{
87
89
91{
92 LPVOID lpAddrStart;
93 DWORD dwBlockUsed;
94
95 /* Handle getting passed a NULL */
96 if( addr == NULL )
97 {
98 return;
99 }
100
101 lpAddrStart = CONTAINING_RECORD(addr, DPLAYX_MEM_SLICE, data); /* Find block header */
102 dwBlockUsed = ((BYTE*)lpAddrStart - (BYTE*)lpMemArea)/dwBlockSize;
103
104 lpMemArea[ dwBlockUsed ].used = FALSE;
105}
106
108{
109 LPVOID lpvArea = NULL;
110 UINT uBlockUsed;
111
112 if( size > (dwBlockSize - sizeof(BOOL)) )
113 {
114 FIXME( "Size exceeded. Request of 0x%08lx\n", size );
115 size = dwBlockSize - sizeof(BOOL);
116 }
117
118 /* Find blank area */
119 uBlockUsed = 0;
120 while( uBlockUsed < dwMaxBlock && lpMemArea[ uBlockUsed ].used ) { uBlockUsed++; }
121
122 if( uBlockUsed < dwMaxBlock )
123 {
124 /* Set the area used */
125 lpMemArea[ uBlockUsed ].used = TRUE;
126 lpvArea = lpMemArea[ uBlockUsed ].data;
127 }
128 else
129 {
130 ERR( "No free block found\n" );
131 return NULL;
132 }
133
134 if( flags & HEAP_ZERO_MEMORY )
135 {
136 ZeroMemory( lpvArea, size );
137 }
138
139 return lpvArea;
140}
141
142
145{
146 /* Points to lpConn + block of contiguous extra memory for dynamic parts
147 * of the struct directly following
148 */
150
151 /* Information for dplobby interfaces */
154
155 /* Should this lobby app send messages to creator at important life
156 * stages
157 */
161
162 /* Sundries */
165
166
168
170/* static DPLAYX_LOBBYDATA lobbyData[ numSupportedLobbies ]; */
171
173/* static DPSESSIONDESC2* sessionData[ numSupportedSessions ]; */
174
175
177{
178 ZeroMemory( lpData, sizeof( *lpData ) );
179}
180
181/* NOTE: This must be called with the semaphore acquired.
182 * TRUE/FALSE with a pointer to its data returned. Pointer data is
183 * is only valid if TRUE is returned.
184 */
185static BOOL DPLAYX_IsAppIdLobbied( DWORD dwAppID, LPDPLAYX_LOBBYDATA* lplpDplData )
186{
187 UINT i;
188
189 *lplpDplData = NULL;
190
191 if( dwAppID == 0 )
192 {
193 dwAppID = GetCurrentProcessId();
194 TRACE( "Translated dwAppID == 0 into 0x%08lx\n", dwAppID );
195 }
196
197 for( i=0; i < numSupportedLobbies; i++ )
198 {
199 if( lobbyData[ i ].dwAppID == dwAppID )
200 {
201 /* This process is lobbied */
202 TRACE( "Found 0x%08lx @ %u\n", dwAppID, i );
203 *lplpDplData = &lobbyData[ i ];
204 return TRUE;
205 }
206 }
207
208 return FALSE;
209}
210
211/* Reserve a spot for the new application. TRUE means success and FALSE failure. */
213{
214 UINT i;
215
216 /* 0 is the marker for unused application data slots */
217 if( dwAppID == 0 )
218 {
219 return FALSE;
220 }
221
223
224 /* Find an empty space in the list and insert the data */
225 for( i=0; i < numSupportedLobbies; i++ )
226 {
227 if( lobbyData[ i ].dwAppID == 0 )
228 {
229 /* This process is now lobbied */
230 TRACE( "Setting lobbyData[%u] for (0x%08lx,0x%08lx)\n",
231 i, dwAppID, GetCurrentProcessId() );
232
233 lobbyData[ i ].dwAppID = dwAppID;
235
236 /* FIXME: Where is the best place for this? In interface or here? */
240
242 return TRUE;
243 }
244 }
245
246 ERR( "No empty lobbies\n" );
247
249 return FALSE;
250}
251
253 HANDLE hStart, HANDLE hDeath, HANDLE hConnRead )
254{
255 LPDPLAYX_LOBBYDATA lpLData;
256
257 /* Need to explicitly give lobby application. Can't set for yourself */
258 if( dwAppID == 0 )
259 {
260 return FALSE;
261 }
262
264
265 if( !DPLAYX_IsAppIdLobbied( dwAppID, &lpLData ) )
266 {
268 return FALSE;
269 }
270
271 lpLData->hInformOnAppStart = hStart;
272 lpLData->hInformOnAppDeath = hDeath;
273 lpLData->hInformOnSettingRead = hConnRead;
274
276
277 return TRUE;
278}
279
281 LPHANDLE lphDeath,
282 LPHANDLE lphConnRead,
283 BOOL bClearSetHandles )
284{
285 LPDPLAYX_LOBBYDATA lpLData;
286
288
289 if( !DPLAYX_IsAppIdLobbied( 0, &lpLData ) )
290 {
292 return FALSE;
293 }
294
295 if( lphStart != NULL )
296 {
297 if( lpLData->hInformOnAppStart == 0 )
298 {
300 return FALSE;
301 }
302
303 *lphStart = lpLData->hInformOnAppStart;
304
305 if( bClearSetHandles )
306 {
307 CloseHandle( lpLData->hInformOnAppStart );
308 lpLData->hInformOnAppStart = 0;
309 }
310 }
311
312 if( lphDeath != NULL )
313 {
314 if( lpLData->hInformOnAppDeath == 0 )
315 {
317 return FALSE;
318 }
319
320 *lphDeath = lpLData->hInformOnAppDeath;
321
322 if( bClearSetHandles )
323 {
324 CloseHandle( lpLData->hInformOnAppDeath );
325 lpLData->hInformOnAppDeath = 0;
326 }
327 }
328
329 if( lphConnRead != NULL )
330 {
331 if( lpLData->hInformOnSettingRead == 0 )
332 {
334 return FALSE;
335 }
336
337 *lphConnRead = lpLData->hInformOnSettingRead;
338
339 if( bClearSetHandles )
340 {
342 lpLData->hInformOnSettingRead = 0;
343 }
344 }
345
347
348 return TRUE;
349}
350
351/***************************************************************************
352 * Called to initialize the global data. This will only be used on the
353 * loading of the dll
354 ***************************************************************************/
356{
357 SECURITY_ATTRIBUTES s_attrib;
358 BOOL bInitializeSharedMemory = FALSE;
359 LPVOID lpDesiredMemoryMapStart = (LPVOID)0x50000000;
360 HANDLE hInformOnStart;
361
362 TRACE( "DPLAYX dll loaded - construct called\n" );
363
364 /* Create a semaphore to block access to DPLAYX global data structs */
365
366 s_attrib.bInheritHandle = TRUE;
367 s_attrib.lpSecurityDescriptor = NULL;
368 s_attrib.nLength = sizeof(s_attrib);
369
370 hDplayxSema = CreateSemaphoreA( &s_attrib, 0, 1, lpszDplayxSemaName );
371
372 /* First instance creates the semaphore. Others just use it */
373 if( GetLastError() == ERROR_SUCCESS )
374 {
375 TRACE( "Semaphore %p created\n", hDplayxSema );
376
377 /* The semaphore creator will also build the shared memory */
378 bInitializeSharedMemory = TRUE;
379 }
380 else if ( GetLastError() == ERROR_ALREADY_EXISTS )
381 {
382 TRACE( "Found semaphore handle %p\n", hDplayxSema );
384 }
385 else
386 {
387 ERR( ": semaphore error %ld\n", GetLastError() );
388 return FALSE;
389 }
390
392
394 &s_attrib,
396 0,
399
400 if( GetLastError() == ERROR_SUCCESS )
401 {
402 TRACE( "File mapped %p created\n", hDplayxSharedMem );
403 }
404 else if ( GetLastError() == ERROR_ALREADY_EXISTS )
405 {
406 TRACE( "Found FileMapping handle %p\n", hDplayxSharedMem );
407 }
408 else
409 {
410 ERR( ": unable to create shared memory (%ld)\n", GetLastError() );
412 return FALSE;
413 }
414
417 0, 0, 0, lpDesiredMemoryMapStart );
418
420 {
421 /* We couldn't map the data where we wanted. Try again, allowing any
422 * location. */
425 0, 0, 0 );
426 }
427
428 if( lpSharedStaticData == NULL )
429 {
430 ERR( ": unable to map static data into process memory space (%ld)\n",
431 GetLastError() );
433 return FALSE;
434 }
435 else
436 {
437 if( lpDesiredMemoryMapStart == lpSharedStaticData )
438 {
439 TRACE( "File mapped to %p\n", lpSharedStaticData );
440 }
441 else
442 {
443 /* Presently the shared data structures use pointers. If the
444 * files are not mapped into the same area, the pointers will no
445 * longer make any sense :(
446 * FIXME: In the future make the shared data structures have some
447 * sort of fixup to make them independent between data spaces.
448 * This will also require a rework of the session data stuff.
449 */
450 ERR( "File mapped to %p (not %p). Expect failure\n",
451 lpSharedStaticData, lpDesiredMemoryMapStart );
452 }
453 }
454
455 /* Dynamic area starts just after the static area */
457
458 /* FIXME: Crude hack */
461
462 /* Initialize shared data segments. */
463 if( bInitializeSharedMemory )
464 {
465 UINT i;
466
467 TRACE( "Initializing shared memory\n" );
468
469 /* Set all lobbies to be "empty" */
470 for( i=0; i < numSupportedLobbies; i++ )
471 {
473 }
474
475 /* Set all sessions to be "empty" */
476 for( i=0; i < numSupportedSessions; i++ )
477 {
478 sessionData[i].dwSize = 0;
479 }
480
481 /* Zero out the dynamic area */
483
484 /* Just for fun sync the whole data area */
486 }
487
489
490 /* Everything was created correctly. Signal the lobby client that
491 * we started up correctly
492 */
493 if( DPLAYX_GetThisLobbyHandles( &hInformOnStart, NULL, NULL, FALSE ) &&
494 hInformOnStart
495 )
496 {
497 BOOL bSuccess;
498 bSuccess = SetEvent( hInformOnStart );
499 TRACE( "Signalling lobby app start event %p %s\n",
500 hInformOnStart, bSuccess ? "succeed" : "failed" );
501
502 /* Close out handle */
503 DPLAYX_GetThisLobbyHandles( &hInformOnStart, NULL, NULL, TRUE );
504 }
505
506 return TRUE;
507}
508
509/***************************************************************************
510 * Called to destroy all global data. This will only be used on the
511 * unloading of the dll
512 ***************************************************************************/
514{
515 HANDLE hInformOnDeath;
516
517 TRACE( "DPLAYX dll unloaded - destruct called\n" );
518
519 /* If required, inform that this app is dying */
520 if( DPLAYX_GetThisLobbyHandles( NULL, &hInformOnDeath, NULL, FALSE ) &&
521 hInformOnDeath
522 )
523 {
524 BOOL bSuccess;
525 bSuccess = SetEvent( hInformOnDeath );
526 TRACE( "Signalling lobby app death event %p %s\n",
527 hInformOnDeath, bSuccess ? "succeed" : "failed" );
528
529 /* Close out handle */
530 DPLAYX_GetThisLobbyHandles( NULL, &hInformOnDeath, NULL, TRUE );
531 }
532
533 /* DO CLEAN UP (LAST) */
534
535 /* Delete the semaphore */
537
538 /* Delete shared memory file mapping */
541
542 return FALSE;
543}
544
545
546/* Assumption: Enough contiguous space was allocated at dest */
548{
549 BYTE* lpStartOfFreeSpace;
550
551 *dest = *src;
552
553 lpStartOfFreeSpace = ((BYTE*)dest) + sizeof( DPLCONNECTION );
554
555 /* Copy the LPDPSESSIONDESC2 structure if it exists */
556 if( src->lpSessionDesc )
557 {
558 dest->lpSessionDesc = (LPDPSESSIONDESC2)lpStartOfFreeSpace;
559 lpStartOfFreeSpace += sizeof( DPSESSIONDESC2 );
560 *dest->lpSessionDesc = *src->lpSessionDesc;
561
562 /* Session names may or may not exist */
563 if( src->lpSessionDesc->lpszSessionNameA )
564 {
565 strcpy( (LPSTR)lpStartOfFreeSpace, src->lpSessionDesc->lpszSessionNameA );
566 dest->lpSessionDesc->lpszSessionNameA = (LPSTR)lpStartOfFreeSpace;
567 lpStartOfFreeSpace +=
568 strlen( dest->lpSessionDesc->lpszSessionNameA ) + 1;
569 }
570
571 if( src->lpSessionDesc->lpszPasswordA )
572 {
573 strcpy( (LPSTR)lpStartOfFreeSpace, src->lpSessionDesc->lpszPasswordA );
574 dest->lpSessionDesc->lpszPasswordA = (LPSTR)lpStartOfFreeSpace;
575 lpStartOfFreeSpace +=
576 strlen( dest->lpSessionDesc->lpszPasswordA ) + 1;
577 }
578 }
579
580 /* DPNAME structure is optional */
581 if( src->lpPlayerName )
582 {
583 dest->lpPlayerName = (LPDPNAME)lpStartOfFreeSpace;
584 lpStartOfFreeSpace += sizeof( DPNAME );
585 *dest->lpPlayerName = *src->lpPlayerName;
586
587 if( src->lpPlayerName->lpszShortNameA )
588 {
589 strcpy( (LPSTR)lpStartOfFreeSpace, src->lpPlayerName->lpszShortNameA );
590 dest->lpPlayerName->lpszShortNameA = (LPSTR)lpStartOfFreeSpace;
591 lpStartOfFreeSpace +=
592 strlen( dest->lpPlayerName->lpszShortNameA ) + 1;
593 }
594
595 if( src->lpPlayerName->lpszLongNameA )
596 {
597 strcpy( (LPSTR)lpStartOfFreeSpace, src->lpPlayerName->lpszLongNameA );
598 dest->lpPlayerName->lpszLongNameA = (LPSTR)lpStartOfFreeSpace;
599 lpStartOfFreeSpace +=
600 strlen( (LPSTR)dest->lpPlayerName->lpszLongName ) + 1 ;
601 }
602
603 }
604
605 /* Copy address if it exists */
606 if( src->lpAddress )
607 {
608 dest->lpAddress = lpStartOfFreeSpace;
609 CopyMemory( lpStartOfFreeSpace, src->lpAddress, src->dwAddressSize );
610 /* No need to advance lpStartOfFreeSpace as there is no more "dynamic" data */
611 }
612}
613
614/* Assumption: Enough contiguous space was allocated at dest */
616{
617 BYTE* lpStartOfFreeSpace;
618
619 *dest = *src;
620
621 lpStartOfFreeSpace = ( (BYTE*)dest) + sizeof( DPLCONNECTION );
622
623 /* Copy the LPDPSESSIONDESC2 structure if it exists */
624 if( src->lpSessionDesc )
625 {
626 dest->lpSessionDesc = (LPDPSESSIONDESC2)lpStartOfFreeSpace;
627 lpStartOfFreeSpace += sizeof( DPSESSIONDESC2 );
628 *dest->lpSessionDesc = *src->lpSessionDesc;
629
630 /* Session names may or may not exist */
631 if( src->lpSessionDesc->lpszSessionName )
632 {
633 lstrcpyW( (LPWSTR)lpStartOfFreeSpace, src->lpSessionDesc->lpszSessionName );
634 dest->lpSessionDesc->lpszSessionName = (LPWSTR)lpStartOfFreeSpace;
635 lpStartOfFreeSpace += sizeof(WCHAR) *
636 ( lstrlenW( dest->lpSessionDesc->lpszSessionName ) + 1 );
637 }
638
639 if( src->lpSessionDesc->lpszPassword )
640 {
641 lstrcpyW( (LPWSTR)lpStartOfFreeSpace, src->lpSessionDesc->lpszPassword );
642 dest->lpSessionDesc->lpszPassword = (LPWSTR)lpStartOfFreeSpace;
643 lpStartOfFreeSpace += sizeof(WCHAR) *
644 ( lstrlenW( dest->lpSessionDesc->lpszPassword ) + 1 );
645 }
646 }
647
648 /* DPNAME structure is optional */
649 if( src->lpPlayerName )
650 {
651 dest->lpPlayerName = (LPDPNAME)lpStartOfFreeSpace;
652 lpStartOfFreeSpace += sizeof( DPNAME );
653 *dest->lpPlayerName = *src->lpPlayerName;
654
655 if( src->lpPlayerName->lpszShortName )
656 {
657 lstrcpyW( (LPWSTR)lpStartOfFreeSpace, src->lpPlayerName->lpszShortName );
658 dest->lpPlayerName->lpszShortName = (LPWSTR)lpStartOfFreeSpace;
659 lpStartOfFreeSpace += sizeof(WCHAR) *
660 ( lstrlenW( dest->lpPlayerName->lpszShortName ) + 1 );
661 }
662
663 if( src->lpPlayerName->lpszLongName )
664 {
665 lstrcpyW( (LPWSTR)lpStartOfFreeSpace, src->lpPlayerName->lpszLongName );
666 dest->lpPlayerName->lpszLongName = (LPWSTR)lpStartOfFreeSpace;
667 lpStartOfFreeSpace += sizeof(WCHAR) *
668 ( lstrlenW( dest->lpPlayerName->lpszLongName ) + 1 );
669 }
670
671 }
672
673 /* Copy address if it exists */
674 if( src->lpAddress )
675 {
676 dest->lpAddress = lpStartOfFreeSpace;
677 CopyMemory( lpStartOfFreeSpace, src->lpAddress, src->dwAddressSize );
678 /* No need to advance lpStartOfFreeSpace as there is no more "dynamic" data */
679 }
680
681}
682
684{
685 DWORD dwTotalSize = sizeof( DPLCONNECTION );
686
687 /* Just a safety check */
688 if( lpConn == NULL )
689 {
690 ERR( "lpConn is NULL\n" );
691 return 0;
692 }
693
694 if( lpConn->lpSessionDesc != NULL )
695 {
696 dwTotalSize += sizeof( DPSESSIONDESC2 );
697
698 if( lpConn->lpSessionDesc->lpszSessionNameA )
699 {
700 dwTotalSize += strlen( lpConn->lpSessionDesc->lpszSessionNameA ) + 1;
701 }
702
703 if( lpConn->lpSessionDesc->lpszPasswordA )
704 {
705 dwTotalSize += strlen( lpConn->lpSessionDesc->lpszPasswordA ) + 1;
706 }
707 }
708
709 if( lpConn->lpPlayerName != NULL )
710 {
711 dwTotalSize += sizeof( DPNAME );
712
713 if( lpConn->lpPlayerName->lpszShortNameA )
714 {
715 dwTotalSize += strlen( lpConn->lpPlayerName->lpszShortNameA ) + 1;
716 }
717
718 if( lpConn->lpPlayerName->lpszLongNameA )
719 {
720 dwTotalSize += strlen( lpConn->lpPlayerName->lpszLongNameA ) + 1;
721 }
722
723 }
724
725 dwTotalSize += lpConn->dwAddressSize;
726
727 return dwTotalSize;
728}
729
731{
732 DWORD dwTotalSize = sizeof( DPLCONNECTION );
733
734 /* Just a safety check */
735 if( lpConn == NULL )
736 {
737 ERR( "lpConn is NULL\n" );
738 return 0;
739 }
740
741 if( lpConn->lpSessionDesc != NULL )
742 {
743 dwTotalSize += sizeof( DPSESSIONDESC2 );
744
745 if( lpConn->lpSessionDesc->lpszSessionName )
746 {
747 dwTotalSize += sizeof( WCHAR ) *
748 ( lstrlenW( lpConn->lpSessionDesc->lpszSessionName ) + 1 );
749 }
750
751 if( lpConn->lpSessionDesc->lpszPassword )
752 {
753 dwTotalSize += sizeof( WCHAR ) *
754 ( lstrlenW( lpConn->lpSessionDesc->lpszPassword ) + 1 );
755 }
756 }
757
758 if( lpConn->lpPlayerName != NULL )
759 {
760 dwTotalSize += sizeof( DPNAME );
761
762 if( lpConn->lpPlayerName->lpszShortName )
763 {
764 dwTotalSize += sizeof( WCHAR ) *
765 ( lstrlenW( lpConn->lpPlayerName->lpszShortName ) + 1 );
766 }
767
768 if( lpConn->lpPlayerName->lpszLongName )
769 {
770 dwTotalSize += sizeof( WCHAR ) *
771 ( lstrlenW( lpConn->lpPlayerName->lpszLongName ) + 1 );
772 }
773
774 }
775
776 dwTotalSize += lpConn->dwAddressSize;
777
778 return dwTotalSize;
779}
780
782( DWORD dwAppID,
783 LPVOID lpData,
784 LPDWORD lpdwDataSize )
785{
786 LPDPLAYX_LOBBYDATA lpDplData;
787 DWORD dwRequiredDataSize = 0;
788 HANDLE hInformOnSettingRead;
789
791
792 if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
793 {
795
796 TRACE( "Application 0x%08lx is not lobbied\n", dwAppID );
797 return DPERR_NOTLOBBIED;
798 }
799
800 dwRequiredDataSize = DPLAYX_SizeOfLobbyDataA( lpDplData->lpConn );
801
802 /* Do they want to know the required buffer size or is the provided buffer
803 * big enough?
804 */
805 if ( ( lpData == NULL ) ||
806 ( *lpdwDataSize < dwRequiredDataSize )
807 )
808 {
810
811 *lpdwDataSize = DPLAYX_SizeOfLobbyDataA( lpDplData->lpConn );
812
814 }
815
816 DPLAYX_CopyConnStructA( lpData, lpDplData->lpConn );
817
819
820 /* They have gotten the information - signal the event if required */
821 if( DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, FALSE ) &&
822 hInformOnSettingRead
823 )
824 {
825 BOOL bSuccess;
826 bSuccess = SetEvent( hInformOnSettingRead );
827 TRACE( "Signalling setting read event %p %s\n",
828 hInformOnSettingRead, bSuccess ? "succeed" : "failed" );
829
830 /* Close out handle */
831 DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, TRUE );
832 }
833
834 return DP_OK;
835}
836
838( DWORD dwAppID,
839 LPVOID lpData,
840 LPDWORD lpdwDataSize )
841{
842 LPDPLAYX_LOBBYDATA lpDplData;
843 DWORD dwRequiredDataSize = 0;
844 HANDLE hInformOnSettingRead;
845
847
848 if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
849 {
851 return DPERR_NOTLOBBIED;
852 }
853
854 dwRequiredDataSize = DPLAYX_SizeOfLobbyDataW( lpDplData->lpConn );
855
856 /* Do they want to know the required buffer size or is the provided buffer
857 * big enough?
858 */
859 if ( ( lpData == NULL ) ||
860 ( *lpdwDataSize < dwRequiredDataSize )
861 )
862 {
864
865 *lpdwDataSize = DPLAYX_SizeOfLobbyDataW( lpDplData->lpConn );
866
868 }
869
870 DPLAYX_CopyConnStructW( lpData, lpDplData->lpConn );
871
873
874 /* They have gotten the information - signal the event if required */
875 if( DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, FALSE ) &&
876 hInformOnSettingRead
877 )
878 {
879 BOOL bSuccess;
880 bSuccess = SetEvent( hInformOnSettingRead );
881 TRACE( "Signalling setting read event %p %s\n",
882 hInformOnSettingRead, bSuccess ? "succeed" : "failed" );
883
884 /* Close out handle */
885 DPLAYX_GetThisLobbyHandles( NULL, NULL, &hInformOnSettingRead, TRUE );
886 }
887
888 return DP_OK;
889}
890
891/* Store the structure into the shared data structure. Ensure that allocs for
892 * variable length strings come from the shared data structure.
893 * FIXME: We need to free information as well.
894 */
896( DWORD dwFlags,
897 DWORD dwAppID,
898 const DPLCONNECTION *lpConn )
899{
900 LPDPLAYX_LOBBYDATA lpDplData;
901
902 /* Parameter check */
903 if( dwFlags || !lpConn )
904 {
905 ERR("invalid parameters.\n");
906 return DPERR_INVALIDPARAMS;
907 }
908
909 /* Store information */
910 if( lpConn->dwSize != sizeof(DPLCONNECTION) )
911 {
912 ERR(": old/new DPLCONNECTION type? Size=%08lx\n", lpConn->dwSize );
913
914 return DPERR_INVALIDPARAMS;
915 }
916
918
919 if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
920 {
922
923 return DPERR_NOTLOBBIED;
924 }
925
926 if( (!lpConn->lpSessionDesc ) ||
927 ( lpConn->lpSessionDesc->dwSize != sizeof( DPSESSIONDESC2 ) )
928 )
929 {
931
932 ERR("DPSESSIONDESC passed in? Size=%lu\n",
933 lpConn->lpSessionDesc?lpConn->lpSessionDesc->dwSize:0 );
934
935 return DPERR_INVALIDPARAMS;
936 }
937
938 /* Free the existing memory */
939 DPLAYX_PrivHeapFree( lpDplData->lpConn );
940
942 DPLAYX_SizeOfLobbyDataA( lpConn ) );
943
944 DPLAYX_CopyConnStructA( lpDplData->lpConn, lpConn );
945
946
948
949 /* FIXME: Send a message - I think */
950
951 return DP_OK;
952}
953
954/* Store the structure into the shared data structure. Ensure that allocs for
955 * variable length strings come from the shared data structure.
956 * FIXME: We need to free information as well
957 */
959( DWORD dwFlags,
960 DWORD dwAppID,
961 const DPLCONNECTION *lpConn )
962{
963 LPDPLAYX_LOBBYDATA lpDplData;
964
965 /* Parameter check */
966 if( dwFlags || !lpConn )
967 {
968 ERR("invalid parameters.\n");
969 return DPERR_INVALIDPARAMS;
970 }
971
972 /* Store information */
973 if( lpConn->dwSize != sizeof(DPLCONNECTION) )
974 {
975 ERR(": old/new DPLCONNECTION type? Size=%lu\n", lpConn->dwSize );
976
977 return DPERR_INVALIDPARAMS;
978 }
979
981
982 if ( ! DPLAYX_IsAppIdLobbied( dwAppID, &lpDplData ) )
983 {
985
986 return DPERR_NOTLOBBIED;
987 }
988
989 /* Free the existing memory */
990 DPLAYX_PrivHeapFree( lpDplData->lpConn );
991
993 DPLAYX_SizeOfLobbyDataW( lpConn ) );
994
995 DPLAYX_CopyConnStructW( lpDplData->lpConn, lpConn );
996
997
999
1000 /* FIXME: Send a message - I think */
1001
1002 return DP_OK;
1003}
1004
1006{
1007 LPDPLAYX_LOBBYDATA lpLobbyData;
1008
1010
1011 if( !DPLAYX_IsAppIdLobbied( 0, &lpLobbyData ) )
1012 {
1014 return FALSE;
1015 }
1016
1017 lpLobbyData->bWaitForConnectionSettings = bWait;
1018
1020
1021 return TRUE;
1022}
1023
1025{
1026 UINT i;
1027 BOOL bFound = FALSE;
1028
1030
1031 for( i=0; i < numSupportedLobbies; i++ )
1032 {
1033 if( ( lobbyData[ i ].dwAppID != 0 ) && /* lobby initialized */
1034 ( lobbyData[ i ].bWaitForConnectionSettings ) /* Waiting */
1035 )
1036 {
1037 bFound = TRUE;
1038 break;
1039 }
1040 }
1041
1043
1044 return bFound;
1045}
1046
1048{
1049 LPDPLAYX_LOBBYDATA lpLobbyData;
1050
1052
1053 if( !DPLAYX_IsAppIdLobbied( dwAppId, &lpLobbyData ) )
1054 {
1056 return FALSE;
1057 }
1058
1059 lpLobbyData->dwLobbyMsgThreadId = dwThreadId;
1060
1062
1063 return TRUE;
1064}
1065
1066/* NOTE: This is potentially not thread safe. You are not guaranteed to end up
1067 with the correct string printed in the case where the HRESULT is not
1068 known. You will just get the last hr passed in. This can change
1069 over time if this method is used a lot :) */
1071{
1072 static char szTempStr[12];
1073
1074 switch (hr)
1075 {
1076 case DP_OK:
1077 return "DP_OK";
1079 return "DPERR_ALREADYINITIALIZED";
1080 case DPERR_ACCESSDENIED:
1081 return "DPERR_ACCESSDENIED";
1083 return "DPERR_ACTIVEPLAYERS";
1085 return "DPERR_BUFFERTOOSMALL";
1087 return "DPERR_CANTADDPLAYER";
1089 return "DPERR_CANTCREATEGROUP";
1091 return "DPERR_CANTCREATEPLAYER";
1093 return "DPERR_CANTCREATESESSION";
1095 return "DPERR_CAPSNOTAVAILABLEYET";
1096 case DPERR_EXCEPTION:
1097 return "DPERR_EXCEPTION";
1098 case DPERR_GENERIC:
1099 return "DPERR_GENERIC";
1100 case DPERR_INVALIDFLAGS:
1101 return "DPERR_INVALIDFLAGS";
1103 return "DPERR_INVALIDOBJECT";
1105 return "DPERR_INVALIDPARAMS";
1107 return "DPERR_INVALIDPLAYER";
1108 case DPERR_INVALIDGROUP:
1109 return "DPERR_INVALIDGROUP";
1110 case DPERR_NOCAPS:
1111 return "DPERR_NOCAPS";
1112 case DPERR_NOCONNECTION:
1113 return "DPERR_NOCONNECTION";
1114 case DPERR_OUTOFMEMORY:
1115 return "DPERR_OUTOFMEMORY";
1116 case DPERR_NOMESSAGES:
1117 return "DPERR_NOMESSAGES";
1119 return "DPERR_NONAMESERVERFOUND";
1120 case DPERR_NOPLAYERS:
1121 return "DPERR_NOPLAYERS";
1122 case DPERR_NOSESSIONS:
1123 return "DPERR_NOSESSIONS";
1124 case DPERR_PENDING:
1125 return "DPERR_PENDING";
1126 case DPERR_SENDTOOBIG:
1127 return "DPERR_SENDTOOBIG";
1128 case DPERR_TIMEOUT:
1129 return "DPERR_TIMEOUT";
1130 case DPERR_UNAVAILABLE:
1131 return "DPERR_UNAVAILABLE";
1132 case DPERR_UNSUPPORTED:
1133 return "DPERR_UNSUPPORTED";
1134 case DPERR_BUSY:
1135 return "DPERR_BUSY";
1136 case DPERR_USERCANCEL:
1137 return "DPERR_USERCANCEL";
1138 case DPERR_NOINTERFACE:
1139 return "DPERR_NOINTERFACE";
1141 return "DPERR_CANNOTCREATESERVER";
1142 case DPERR_PLAYERLOST:
1143 return "DPERR_PLAYERLOST";
1144 case DPERR_SESSIONLOST:
1145 return "DPERR_SESSIONLOST";
1147 return "DPERR_UNINITIALIZED";
1148 case DPERR_NONEWPLAYERS:
1149 return "DPERR_NONEWPLAYERS";
1151 return "DPERR_INVALIDPASSWORD";
1152 case DPERR_CONNECTING:
1153 return "DPERR_CONNECTING";
1155 return "DPERR_CONNECTIONLOST";
1157 return "DPERR_UNKNOWNMESSAGE";
1158 case DPERR_CANCELFAILED:
1159 return "DPERR_CANCELFAILED";
1161 return "DPERR_INVALIDPRIORITY";
1162 case DPERR_NOTHANDLED:
1163 return "DPERR_NOTHANDLED";
1164 case DPERR_CANCELLED:
1165 return "DPERR_CANCELLED";
1166 case DPERR_ABORTED:
1167 return "DPERR_ABORTED";
1169 return "DPERR_BUFFERTOOLARGE";
1171 return "DPERR_CANTCREATEPROCESS";
1173 return "DPERR_APPNOTSTARTED";
1175 return "DPERR_INVALIDINTERFACE";
1177 return "DPERR_NOSERVICEPROVIDER";
1179 return "DPERR_UNKNOWNAPPLICATION";
1180 case DPERR_NOTLOBBIED:
1181 return "DPERR_NOTLOBBIED";
1183 return "DPERR_SERVICEPROVIDERLOADED";
1185 return "DPERR_ALREADYREGISTERED";
1187 return "DPERR_NOTREGISTERED";
1189 return "DPERR_AUTHENTICATIONFAILED";
1190 case DPERR_CANTLOADSSPI:
1191 return "DPERR_CANTLOADSSPI";
1193 return "DPERR_ENCRYPTIONFAILED";
1194 case DPERR_SIGNFAILED:
1195 return "DPERR_SIGNFAILED";
1197 return "DPERR_CANTLOADSECURITYPACKAGE";
1199 return "DPERR_ENCRYPTIONNOTSUPPORTED";
1200 case DPERR_CANTLOADCAPI:
1201 return "DPERR_CANTLOADCAPI";
1202 case DPERR_NOTLOGGEDIN:
1203 return "DPERR_NOTLOGGEDIN";
1204 case DPERR_LOGONDENIED:
1205 return "DPERR_LOGONDENIED";
1206 default:
1207 /* For errors not in the list, return HRESULT as a string
1208 This part is not thread safe */
1209 WARN( "Unknown error 0x%08lx\n", hr );
1210 wsprintfA( szTempStr, "0x%08x", hr );
1211 return szTempStr;
1212 }
1213}
static int used
Definition: adh-main.c:39
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
HRESULT hr
Definition: delayimp.cpp:582
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define ERROR_INVALID_ADDRESS
Definition: compat.h:106
#define UnmapViewOfFile
Definition: compat.h:746
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define lstrcpyW
Definition: compat.h:749
#define MapViewOfFile
Definition: compat.h:745
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define lstrlenW
Definition: compat.h:750
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
#define DPERR_INVALIDOBJECT
Definition: dplay.h:101
#define DPERR_BUSY
Definition: dplay.h:119
#define DPERR_NOCAPS
Definition: dplay.h:106
#define DPERR_ACCESSDENIED
Definition: dplay.h:90
#define DPERR_UNKNOWNAPPLICATION
Definition: dplay.h:141
#define DPERR_GENERIC
Definition: dplay.h:99
#define DPERR_NOTLOGGEDIN
Definition: dplay.h:153
#define DPERR_NOSESSIONS
Definition: dplay.h:113
#define DPERR_LOGONDENIED
Definition: dplay.h:154
#define DPERR_NOTREGISTERED
Definition: dplay.h:145
#define DPERR_PENDING
Definition: dplay.h:114
#define DPERR_CANTADDPLAYER
Definition: dplay.h:93
#define DPERR_NOSERVICEPROVIDER
Definition: dplay.h:140
#define DPERR_BUFFERTOOLARGE
Definition: dplay.h:136
#define DPERR_SESSIONLOST
Definition: dplay.h:124
#define DPERR_NONEWPLAYERS
Definition: dplay.h:126
#define DPERR_UNINITIALIZED
Definition: dplay.h:125
#define DPERR_CANTCREATEPLAYER
Definition: dplay.h:95
#define DPERR_ALREADYREGISTERED
Definition: dplay.h:144
#define DPERR_INVALIDGROUP
Definition: dplay.h:105
struct tagDPNAME * LPDPNAME
#define DPERR_AUTHENTICATIONFAILED
Definition: dplay.h:146
#define DPERR_ENCRYPTIONFAILED
Definition: dplay.h:148
#define DPERR_INVALIDINTERFACE
Definition: dplay.h:139
#define DPERR_EXCEPTION
Definition: dplay.h:98
#define DPERR_NOINTERFACE
Definition: dplay.h:121
#define DPERR_ABORTED
Definition: dplay.h:135
#define DPERR_CANNOTCREATESERVER
Definition: dplay.h:122
#define DPERR_CANTLOADCAPI
Definition: dplay.h:152
#define DPERR_ENCRYPTIONNOTSUPPORTED
Definition: dplay.h:151
#define DPERR_CAPSNOTAVAILABLEYET
Definition: dplay.h:97
#define DPERR_CONNECTING
Definition: dplay.h:128
#define DPERR_CONNECTIONLOST
Definition: dplay.h:129
#define DPERR_BUFFERTOOSMALL
Definition: dplay.h:92
#define DPERR_ALREADYINITIALIZED
Definition: dplay.h:89
#define DPERR_INVALIDFLAGS
Definition: dplay.h:100
#define DPERR_CANTLOADSSPI
Definition: dplay.h:147
#define DPERR_TIMEOUT
Definition: dplay.h:116
#define DPERR_SERVICEPROVIDERLOADED
Definition: dplay.h:143
#define DPERR_UNSUPPORTED
Definition: dplay.h:118
#define DPERR_PLAYERLOST
Definition: dplay.h:123
#define DPERR_UNKNOWNMESSAGE
Definition: dplay.h:130
#define DP_OK
Definition: dplay.h:88
#define DPERR_CANTCREATEGROUP
Definition: dplay.h:94
#define DPERR_CANCELLED
Definition: dplay.h:134
struct tagDPNAME DPNAME
#define DPERR_UNAVAILABLE
Definition: dplay.h:117
#define DPERR_NONAMESERVERFOUND
Definition: dplay.h:111
#define DPERR_CANCELFAILED
Definition: dplay.h:131
#define DPERR_APPNOTSTARTED
Definition: dplay.h:138
#define DPERR_SIGNFAILED
Definition: dplay.h:149
#define DPERR_INVALIDPLAYER
Definition: dplay.h:104
#define DPERR_USERCANCEL
Definition: dplay.h:120
#define DPERR_NOTLOBBIED
Definition: dplay.h:142
#define DPERR_NOCONNECTION
Definition: dplay.h:107
#define DPERR_INVALIDPARAMS
Definition: dplay.h:103
#define DPERR_INVALIDPASSWORD
Definition: dplay.h:127
#define DPERR_ACTIVEPLAYERS
Definition: dplay.h:91
struct tagDPLCONNECTION DPLCONNECTION
#define DPERR_OUTOFMEMORY
Definition: dplay.h:109
#define DPERR_CANTCREATEPROCESS
Definition: dplay.h:137
struct tagDPSESSIONDESC2 * LPDPSESSIONDESC2
#define DPERR_INVALIDPRIORITY
Definition: dplay.h:132
#define DPERR_CANTCREATESESSION
Definition: dplay.h:96
#define DPERR_NOTHANDLED
Definition: dplay.h:133
#define DPERR_SENDTOOBIG
Definition: dplay.h:115
#define DPERR_NOMESSAGES
Definition: dplay.h:110
#define DPERR_NOPLAYERS
Definition: dplay.h:112
struct tagDPSESSIONDESC2 DPSESSIONDESC2
#define DPERR_CANTLOADSECURITYPACKAGE
Definition: dplay.h:150
static BOOL DPLAYX_IsAppIdLobbied(DWORD dwAppID, LPDPLAYX_LOBBYDATA *lplpDplData)
static const char lpszDplayxSemaName[]
Definition: dplayx_global.c:51
static BOOL DPLAYX_GetThisLobbyHandles(LPHANDLE lphStart, LPHANDLE lphDeath, LPHANDLE lphConnRead, BOOL bClearSetHandles)
HRESULT DPLAYX_GetConnectionSettingsA(DWORD dwAppID, LPVOID lpData, LPDWORD lpdwDataSize)
static DPSESSIONDESC2 * sessionData
BOOL DPLAYX_SetLobbyHandles(DWORD dwAppID, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead)
#define dwDynamicSharedSize
Definition: dplayx_global.c:70
static DPLAYX_MEM_SLICE * lpMemArea
Definition: dplayx_global.c:88
#define dwTotalSharedSize
Definition: dplayx_global.c:71
static void DPLAYX_InitializeLobbyDataEntry(LPDPLAYX_LOBBYDATA lpData)
static DWORD DPLAYX_SizeOfLobbyDataA(const DPLCONNECTION *lpConn)
static const char lpszDplayxFileMapping[]
Definition: dplayx_global.c:54
BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void)
static void DPLAYX_PrivHeapFree(LPVOID addr)
Definition: dplayx_global.c:90
static void DPLAYX_CopyConnStructA(LPDPLCONNECTION dest, const DPLCONNECTION *src)
HRESULT DPLAYX_SetConnectionSettingsA(DWORD dwFlags, DWORD dwAppID, const DPLCONNECTION *lpConn)
#define dwMaxBlock
Definition: dplayx_global.c:79
#define DPLAYX_ReleaseSemaphore()
Definition: dplayx_global.c:64
static LPVOID lpSharedStaticData
Definition: dplayx_global.c:57
static DWORD DPLAYX_SizeOfLobbyDataW(const DPLCONNECTION *lpConn)
#define dwBlockSize
Definition: dplayx_global.c:78
BOOL DPLAYX_SetLobbyMsgThreadId(DWORD dwAppId, DWORD dwThreadId)
BOOL DPLAYX_CreateLobbyApplication(DWORD dwAppID)
BOOL DPLAYX_WaitForConnectionSettings(BOOL bWait)
@ numSupportedSessions
@ numSupportedLobbies
static LPVOID DPLAYX_PrivHeapAlloc(DWORD flags, DWORD size)
HRESULT DPLAYX_SetConnectionSettingsW(DWORD dwFlags, DWORD dwAppID, const DPLCONNECTION *lpConn)
LPCSTR DPLAYX_HresultToString(HRESULT hr)
static HANDLE hDplayxSharedMem
Definition: dplayx_global.c:55
BOOL DPLAYX_DestructData(void)
struct tagDPLAYX_LOBBYDATA DPLAYX_LOBBYDATA
struct tagDPLAYX_LOBBYDATA * LPDPLAYX_LOBBYDATA
static DPLAYX_LOBBYDATA * lobbyData
HRESULT DPLAYX_GetConnectionSettingsW(DWORD dwAppID, LPVOID lpData, LPDWORD lpdwDataSize)
static HANDLE hDplayxSema
Definition: dplayx_global.c:52
static void DPLAYX_CopyConnStructW(LPDPLCONNECTION dest, const DPLCONNECTION *src)
#define DPLAYX_AcquireSemaphore()
Definition: dplayx_global.c:60
#define dwStaticSharedSize
Definition: dplayx_global.c:69
BOOL DPLAYX_ConstructData(void)
DWORD dwThreadId
Definition: fdebug.c:31
LPVOID NTAPI MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress)
Definition: filemap.c:162
BOOL NTAPI FlushViewOfFile(IN LPCVOID lpBaseAddress, IN SIZE_T dwNumberOfBytesToFlush)
Definition: filemap.c:352
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum src
Definition: glext.h:6340
GLsizeiptr size
Definition: glext.h:5919
GLbitfield flags
Definition: glext.h:7161
GLenum const GLvoid * addr
Definition: glext.h:9621
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
unsigned int UINT
Definition: sysinfo.c:13
#define C_ASSERT(e)
Definition: intsafe.h:73
#define ZeroMemory
Definition: minwinbase.h:31
#define CopyMemory
Definition: minwinbase.h:29
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
static char * dest
Definition: rtl.c:149
#define SEC_COMMIT
Definition: mmtypes.h:100
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define PAGE_READWRITE
Definition: nt_native.h:1307
#define LPVOID
Definition: nt_native.h:45
#define BOOL
Definition: nt_native.h:43
short WCHAR
Definition: pedump.c:58
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
strcpy
Definition: string.h:131
#define TRACE(s)
Definition: solgame.cpp:4
BYTE data[dwBlockSize - sizeof(BOOL)]
Definition: dplayx_global.c:84
LPVOID lpSecurityDescriptor
Definition: compat.h:193
LPDPLCONNECTION lpConn
LPDPSESSIONDESC2 lpSessionDesc
Definition: dplay.h:286
DWORD dwAddressSize
Definition: dplay.h:290
DWORD dwSize
Definition: dplay.h:284
LPDPNAME lpPlayerName
Definition: dplay.h:287
LPSTR lpszShortNameA
Definition: dplay.h:194
LPSTR lpszLongNameA
Definition: dplay.h:200
LPWSTR lpszLongName
Definition: dplay.h:199
LPWSTR lpszShortName
Definition: dplay.h:193
LPSTR lpszSessionNameA
Definition: dplay.h:244
LPSTR lpszPasswordA
Definition: dplay.h:250
LPWSTR lpszPassword
Definition: dplay.h:249
LPWSTR lpszSessionName
Definition: dplay.h:243
DWORD dwSize
Definition: dplay.h:232
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:669
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
Definition: synchansi.c:44
const char * LPCSTR
Definition: typedefs.h:52
uint16_t * LPWSTR
Definition: typedefs.h:56
uint32_t * LPDWORD
Definition: typedefs.h:59
char * LPSTR
Definition: typedefs.h:51
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FILE_MAP_WRITE
Definition: winbase.h:157
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1205
unsigned char BYTE
Definition: xxhash.c:193