source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dplobby8.h@ 1180

Last change on this file since 1180 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 13.2 KB
Line 
1#undef INTERFACE
2/*
3 * Copyright (C) 2003-2005 Raphael Junqueira
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#ifndef __WINE_DPLOBBY8_H
21#define __WINE_DPLOBBY8_H
22
23#include <ole2.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* defined(__cplusplus) */
28
29/*****************************************************************************
30 * DirectPlay8Lobby defines
31 */
32#define DPL_MSGID_LOBBY 0x8000
33#define DPL_MSGID_RECEIVE (0x0001 | DPL_MSGID_LOBBY)
34#define DPL_MSGID_CONNECT (0x0002 | DPL_MSGID_LOBBY)
35#define DPL_MSGID_DISCONNECT (0x0003 | DPL_MSGID_LOBBY)
36#define DPL_MSGID_SESSION_STATUS (0x0004 | DPL_MSGID_LOBBY)
37#define DPL_MSGID_CONNECTION_SETTINGS (0x0005 | DPL_MSGID_LOBBY)
38#define DPLHANDLE_ALLCONNECTIONS 0xFFFFFFFF
39#define DPLSESSION_CONNECTED 0x0001
40#define DPLSESSION_COULDNOTCONNECT 0x0002
41#define DPLSESSION_DISCONNECTED 0x0003
42#define DPLSESSION_TERMINATED 0x0004
43#define DPLSESSION_HOSTMIGRATED 0x0005
44#define DPLSESSION_HOSTMIGRATEDHERE 0x0006
45#define DPLAVAILABLE_ALLOWMULTIPLECONNECT 0x0001
46#define DPLCONNECT_LAUNCHNEW 0x0001
47#define DPLCONNECT_LAUNCHNOTFOUND 0x0002
48#define DPLCONNECTSETTINGS_HOST 0x0001
49#define DPLINITIALIZE_DISABLEPARAMVAL 0x0001
50
51/*****************************************************************************
52 * DirectPlay8Lobby structures Typedefs
53 */
54typedef struct _DPL_APPLICATION_INFO {
55 GUID guidApplication;
56 PWSTR pwszApplicationName;
57 DWORD dwNumRunning;
58 DWORD dwNumWaiting;
59 DWORD dwFlags;
60} DPL_APPLICATION_INFO, *PDPL_APPLICATION_INFO;
61
62typedef struct _DPL_CONNECTION_SETTINGS {
63 DWORD dwSize;
64 DWORD dwFlags;
65 DPN_APPLICATION_DESC dpnAppDesc;
66 IDirectPlay8Address* pdp8HostAddress;
67 IDirectPlay8Address** ppdp8DeviceAddresses;
68 DWORD cNumDeviceAddresses;
69 PWSTR pwszPlayerName;
70} DPL_CONNECTION_SETTINGS, *PDPL_CONNECTION_SETTINGS;
71
72typedef struct _DPL_CONNECT_INFO {
73 DWORD dwSize;
74 DWORD dwFlags;
75 GUID guidApplication;
76 PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
77 PVOID pvLobbyConnectData;
78 DWORD dwLobbyConnectDataSize;
79} DPL_CONNECT_INFO, *PDPL_CONNECT_INFO;
80
81typedef struct _DPL_PROGRAM_DESC {
82 DWORD dwSize;
83 DWORD dwFlags;
84 GUID guidApplication;
85 PWSTR pwszApplicationName;
86 PWSTR pwszCommandLine;
87 PWSTR pwszCurrentDirectory;
88 PWSTR pwszDescription;
89 PWSTR pwszExecutableFilename;
90 PWSTR pwszExecutablePath;
91 PWSTR pwszLauncherFilename;
92 PWSTR pwszLauncherPath;
93} DPL_PROGRAM_DESC, *PDPL_PROGRAM_DESC;
94
95typedef struct _DPL_MESSAGE_CONNECT {
96 DWORD dwSize;
97 DPNHANDLE hConnectId;
98 PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
99 PVOID pvLobbyConnectData;
100 DWORD dwLobbyConnectDataSize;
101 PVOID pvConnectionContext;
102} DPL_MESSAGE_CONNECT, *PDPL_MESSAGE_CONNECT;
103
104typedef struct _DPL_MESSAGE_CONNECTION_SETTINGS {
105 DWORD dwSize;
106 DPNHANDLE hSender;
107 PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
108 PVOID pvConnectionContext;
109} DPL_MESSAGE_CONNECTION_SETTINGS, *PDPL_MESSAGE_CONNECTION_SETTINGS;
110
111typedef struct _DPL_MESSAGE_DISCONNECT {
112 DWORD dwSize;
113 DPNHANDLE hDisconnectId;
114 HRESULT hrReason;
115 PVOID pvConnectionContext;
116} DPL_MESSAGE_DISCONNECT, *PDPL_MESSAGE_DISCONNECT;
117
118typedef struct _DPL_MESSAGE_RECEIVE {
119 DWORD dwSize;
120 DPNHANDLE hSender;
121 BYTE* pBuffer;
122 DWORD dwBufferSize;
123 PVOID pvConnectionContext;
124} DPL_MESSAGE_RECEIVE, *PDPL_MESSAGE_RECEIVE;
125
126typedef struct _DPL_MESSAGE_SESSION_STATUS {
127 DWORD dwSize;
128 DPNHANDLE hSender;
129 DWORD dwStatus;
130 PVOID pvConnectionContext;
131} DPL_MESSAGE_SESSION_STATUS, *PDPL_MESSAGE_SESSION_STATUS;
132
133/*****************************************************************************
134 * Predeclare the interfaces
135 */
136DEFINE_GUID(CLSID_DirectPlay8LobbiedApplication, 0x667955ad,0x6b3b,0x43ca,0xb9,0x49,0xbc,0x69,0xb5,0xba,0xff,0x7f);
137DEFINE_GUID(CLSID_DirectPlay8LobbyClient, 0x3b2b6775,0x70b6,0x45af,0x8d,0xea,0xa2,0x09,0xc6,0x95,0x59,0xf3);
138
139DEFINE_GUID(IID_IDirectPlay8LobbiedApplication, 0x819074a3,0x16c,0x11d3,0xae,0x14,0x00,0x60,0x97,0xb0,0x14,0x11);
140typedef struct IDirectPlay8LobbiedApplication *PDIRECTPLAY8LOBBIEDAPPLICATION;
141DEFINE_GUID(IID_IDirectPlay8LobbyClient, 0x819074a2,0x16c,0x11d3,0xae,0x14,0x00,0x60,0x97,0xb0,0x14,0x11);
142typedef struct IDirectPlay8LobbyClient *PDIRECTPLAY8LOBBYCLIENT;
143
144/*****************************************************************************
145 * IDirectPlay8LobbiedApplication interface
146 */
147#define INTERFACE IDirectPlay8LobbiedApplication
148DECLARE_INTERFACE_(IDirectPlay8LobbiedApplication,IUnknown)
149{
150 /*** IUnknown methods ***/
151 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
152 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
153 STDMETHOD_(ULONG,Release)(THIS) PURE;
154 /*** IDirectPlay8LobbiedApplication methods ***/
155 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DPNHANDLE* pdpnhConnection, DWORD dwFlags) PURE;
156 STDMETHOD(RegisterProgram)(THIS_ PDPL_PROGRAM_DESC pdplProgramDesc, DWORD dwFlags) PURE;
157 STDMETHOD(UnRegisterProgram)(THIS_ GUID* pguidApplication, DWORD dwFlags) PURE;
158 STDMETHOD(Send)(THIS_ DPNHANDLE hConnection, BYTE* pBuffer, DWORD pBufferSize, DWORD dwFlags) PURE;
159 STDMETHOD(SetAppAvailable)(THIS_ WINBOOL fAvailable, DWORD dwFlags) PURE;
160 STDMETHOD(UpdateStatus)(THIS_ DPNHANDLE hConnection, DWORD dwStatus, DWORD dwFlags) PURE;
161 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
162 STDMETHOD(GetConnectionSettings)(THIS_ DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD* pdwInfoSize, DWORD dwFlags) PURE;
163 STDMETHOD(SetConnectionSettings)(THIS_ DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD dwFlags) PURE;
164};
165#undef INTERFACE
166
167#if !defined(__cplusplus) || defined(CINTERFACE)
168/*** IUnknown methods ***/
169#define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
170#define IDirectPlay8LobbiedApplication_AddRef(p) (p)->lpVtbl->AddRef(p)
171#define IDirectPlay8LobbiedApplication_Release(p) (p)->lpVtbl->Release(p)
172/*** IDirectPlay8LobbiedApplication methods ***/
173#define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->lpVtbl->Initialize(p,a,b,c,d)
174#define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->lpVtbl->RegisterProgram(p,a,b)
175#define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->lpVtbl->UnRegisterProgram(p,a,b)
176#define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d)
177#define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->lpVtbl->SetAppAvailable(p,a,b)
178#define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->lpVtbl->UpdateStatus(p,a,b,c)
179#define IDirectPlay8LobbiedApplication_Close(p,a) (p)->lpVtbl->Close(p,a)
180#define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d)
181#define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
182#else
183/*** IUnknown methods ***/
184#define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
185#define IDirectPlay8LobbiedApplication_AddRef(p) (p)->AddRef()
186#define IDirectPlay8LobbiedApplication_Release(p) (p)->Release()
187/*** IDirectPlay8LobbiedApplication methods ***/
188#define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->Initialize(a,b,c,d)
189#define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->RegisterProgram(a,b)
190#define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->UnRegisterProgram(a,b)
191#define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->Send(a,b,c,d)
192#define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->SetAppAvailable(a,b)
193#define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->UpdateStatus(a,b,c)
194#define IDirectPlay8LobbiedApplication_Close(p,a) (p)->Close(a)
195#define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d)
196#define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
197#endif
198
199/*****************************************************************************
200 * IDirectPlay8LobbyClient interface
201 */
202#define INTERFACE IDirectPlay8LobbyClient
203DECLARE_INTERFACE_(IDirectPlay8LobbyClient,IUnknown)
204{
205 /*** IUnknown methods ***/
206 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
207 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
208 STDMETHOD_(ULONG,Release)(THIS) PURE;
209 /*** IDirectPlay8LobbyClient methods ***/
210 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
211 STDMETHOD(EnumLocalPrograms)(THIS_ GUID* pGuidApplication, BYTE* pEnumData, DWORD* pdwEnumData, DWORD* pdwItems, DWORD dwFlags) PURE;
212 STDMETHOD(ConnectApplication)(THIS_ DPL_CONNECT_INFO* pdplConnectionInfo, PVOID pvConnectionContext, DPNHANDLE* hApplication, DWORD dwTimeOut, DWORD dwFlags) PURE;
213 STDMETHOD(Send)(THIS_ DPNHANDLE hConnection, BYTE* pBuffer, DWORD pBufferSize, DWORD dwFlags) PURE;
214 STDMETHOD(ReleaseApplication)(THIS_ DPNHANDLE hConnection, DWORD dwFlags) PURE;
215 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
216 STDMETHOD(GetConnectionSettings)(THIS_ DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD* pdwInfoSize, DWORD dwFlags) PURE;
217 STDMETHOD(SetConnectionSettings)(THIS_ DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD dwFlags) PURE;
218};
219#undef INTERFACE
220
221#if !defined(__cplusplus) || defined(CINTERFACE)
222/*** IUnknown methods ***/
223#define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
224#define IDirectPlay8LobbyClient_AddRef(p) (p)->lpVtbl->AddRef(p)
225#define IDirectPlay8LobbyClient_Release(p) (p)->lpVtbl->Release(p)
226/*** IDirectPlay8LobbyClient methods ***/
227#define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
228#define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->lpVtbl->EnumLocalPrograms(p,a,b,c,d,e)
229#define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->lpVtbl->ConnectApplication(p,a,b,c,d,e)
230#define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d)
231#define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->lpVtbl->ReleaseApplication(p,a,b)
232#define IDirectPlay8LobbyClient_Close(p,a) (p)->lpVtbl->Close(p,a)
233#define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d)
234#define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
235#else
236/*** IUnknown methods ***/
237#define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
238#define IDirectPlay8LobbyClient_AddRef(p) (p)->AddRef()
239#define IDirectPlay8LobbyClient_Release(p) (p)->Release()
240/*** IDirectPlay8LobbyClient methods ***/
241#define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
242#define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->EnumLocalPrograms(a,b,c,d,e)
243#define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->ConnectApplication(a,b,c,d,e)
244#define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->Send(a,b,c,d)
245#define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->ReleaseApplication(a,b)
246#define IDirectPlay8LobbyClient_Close(p,a) (p)->Close(a)
247#define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d)
248#define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
249#endif
250
251
252/* Export functions */
253
254HRESULT WINAPI DirectPlay8LobbyCreate(const GUID* pcIID, LPVOID* ppvInterface, IUnknown* pUnknown);
255
256#ifdef __cplusplus
257}
258#endif
259
260#endif
Note: See TracBrowser for help on using the repository browser.