msvcrt: Don't include MSVC 7.0+ exception functions in SOs for older DLLs.
[wine.git] / dlls / dpnet / dpnet_private.h
blob44ff289d9b806637f53046f71e49cbdbc93b272d
1 /*
2 * DirectPlay8 (dpnet) private include file
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
21 #ifndef __WINE_DPNET_PRIVATE_H
22 #define __WINE_DPNET_PRIVATE_H
24 #ifndef __WINE_CONFIG_H
25 # error You must include config.h to use this header
26 #endif
28 #include <wine/list.h>
29 #include "winsock2.h"
30 #include "wine/unicode.h"
32 #include "dplay8.h"
33 #include "dplobby8.h"
35 *#include "dplay8sp.h"
38 /* DirectPlay8 Interfaces: */
39 typedef struct IDirectPlay8ClientImpl IDirectPlay8ClientImpl;
40 typedef struct IDirectPlay8AddressImpl IDirectPlay8AddressImpl;
41 typedef struct IDirectPlay8LobbiedApplicationImpl IDirectPlay8LobbiedApplicationImpl;
42 typedef struct IDirectPlay8ThreadPoolImpl IDirectPlay8ThreadPoolImpl;
44 /* ------------------ */
45 /* IDirectPlay8Client */
46 /* ------------------ */
48 /*****************************************************************************
49 * IDirectPlay8Client implementation structure
51 struct IDirectPlay8ClientImpl
53 IDirectPlay8Client IDirectPlay8Client_iface;
54 LONG ref;
56 /* IDirectPlay8Client fields */
57 PFNDPNMESSAGEHANDLER msghandler;
58 DWORD flags;
59 void *usercontext;
60 WCHAR *username;
61 void *data;
62 DWORD datasize;
64 DPN_SP_CAPS spcaps;
67 /* ------------------- */
68 /* IDirectPlay8Address */
69 /* ------------------- */
70 struct component
72 struct list entry;
74 WCHAR *name;
75 DWORD type;
76 DWORD size;
78 union
80 DWORD value; /* DPNA_DATATYPE_DWORD */
81 GUID guid; /* DPNA_DATATYPE_GUID */
82 WCHAR *string; /* DPNA_DATATYPE_STRING */
83 char *ansi; /* DPNA_DATATYPE_STRING_ANSI */
84 void *binary; /* DPNA_DATATYPE_BINARY */
85 } data;
88 /*****************************************************************************
89 * IDirectPlay8Address implementation structure
91 struct IDirectPlay8AddressImpl
93 IDirectPlay8Address IDirectPlay8Address_iface;
94 LONG ref;
95 /* IDirectPlay8Address fields */
96 GUID SP_guid;
97 BOOL init;
99 struct component **components;
100 DWORD comp_count;
101 DWORD comp_array_size;
104 /*****************************************************************************
105 * IDirectPlay8LobbiedApplication implementation structure
107 struct IDirectPlay8LobbiedApplicationImpl
109 IDirectPlay8LobbiedApplication IDirectPlay8LobbiedApplication_iface;
110 LONG ref;
112 PFNDPNMESSAGEHANDLER msghandler;
113 DWORD flags;
114 void *usercontext;
115 DPNHANDLE *connection;
118 /*****************************************************************************
119 * IDirectPlay8ThreadPool implementation structure
121 struct IDirectPlay8ThreadPoolImpl
123 IDirectPlay8ThreadPool IDirectPlay8ThreadPool_iface;
124 LONG ref;
128 * factories
130 extern HRESULT DPNET_CreateDirectPlay8Client(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
131 extern HRESULT DPNET_CreateDirectPlay8Server(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
132 extern HRESULT DPNET_CreateDirectPlay8Peer(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
133 extern HRESULT DPNET_CreateDirectPlay8Address(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
134 extern HRESULT DPNET_CreateDirectPlay8LobbiedApp(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
135 extern HRESULT DPNET_CreateDirectPlay8ThreadPool(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
136 extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppobj) DECLSPEC_HIDDEN;
138 extern void init_dpn_sp_caps(DPN_SP_CAPS *dpnspcaps) DECLSPEC_HIDDEN;
139 extern void init_winsock(void) DECLSPEC_HIDDEN;
140 extern HRESULT enum_services_providers(const GUID * const service, DPN_SERVICE_PROVIDER_INFO * const info_buffer,
141 DWORD * const buf_size, DWORD * const returned) DECLSPEC_HIDDEN;
143 /* used for generic dumping (copied from ddraw) */
144 typedef struct {
145 DWORD val;
146 const char* name;
147 } flag_info;
149 typedef struct {
150 const GUID *guid;
151 const char* name;
152 } guid_info;
154 #define FE(x) { x, #x }
155 #define GE(x) { &x, #x }
157 static inline void __WINE_ALLOC_SIZE(1) *heap_alloc( size_t len )
159 return HeapAlloc( GetProcessHeap(), 0, len );
162 static inline void __WINE_ALLOC_SIZE(2) *heap_realloc(void *mem, size_t len)
164 return HeapReAlloc( GetProcessHeap(), 0, mem, len);
167 static inline BOOL heap_free( void *mem )
169 return HeapFree( GetProcessHeap(), 0, mem );
172 static inline WCHAR *heap_strdupW( const WCHAR *src )
174 WCHAR *dst;
175 if (!src) return NULL;
176 if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src );
177 return dst;
180 #endif