Fixed crash in winamp reported by Andreas Mohr.
[wine] / dlls / dplayx / dplayx_global.h
1 /*
2  * Copyright 1999, 2000 Peter Hunnisett
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_DPLAYX_GLOBAL
20 #define __WINE_DPLAYX_GLOBAL
21
22 #include "dplay.h"
23
24 BOOL DPLAYX_ConstructData(void);
25 BOOL DPLAYX_DestructData(void);
26
27 HRESULT DPLAYX_GetConnectionSettingsA ( DWORD dwAppID,
28                                         LPVOID lpData,
29                                         LPDWORD lpdwDataSize );
30 HRESULT DPLAYX_GetConnectionSettingsW ( DWORD dwAppID,
31                                         LPVOID lpData,
32                                         LPDWORD lpdwDataSize );
33
34 HRESULT DPLAYX_SetConnectionSettingsA ( DWORD dwFlags,
35                                         DWORD dwAppID,
36                                         LPDPLCONNECTION lpConn );
37 HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags,
38                                         DWORD dwAppID,
39                                         LPDPLCONNECTION lpConn );
40
41 BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID );
42 BOOL DPLAYX_DestroyLobbyApplication( DWORD dwAppID );
43
44 BOOL DPLAYX_WaitForConnectionSettings( BOOL bWait );
45 BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void);
46
47 BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID,
48                              HANDLE hStart, HANDLE hDeath, HANDLE hConnRead );
49 BOOL DPLAYX_GetThisLobbyHandles( LPHANDLE lphStart,
50                                  LPHANDLE lphDeath,
51                                  LPHANDLE lphConnRead, BOOL bClearSetHandles );
52
53 LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateLocalSession( UINT* index );
54 BOOL DPLAYX_CopyLocalSession( UINT* index, LPDPSESSIONDESC2 lpsd );
55 void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd );
56
57 BOOL DPLAYX_SetLobbyMsgThreadId( DWORD dwAppId, DWORD dwThreadId );
58
59 /* FIXME: This should not be here */
60 LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size );
61 void DPLAYX_PrivHeapFree( LPVOID addr );
62
63 LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str );
64 LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str );
65 /* FIXME: End shared data alloc which should be local */
66
67
68 /* Convert a DP or DPL HRESULT code into a string for human consumption */
69 LPCSTR DPLAYX_HresultToString( HRESULT hr );
70
71 #endif /* __WINE_DPLAYX_GLOBAL */