Fixed prototypes of CreateStatusWindowA/W, ImageList_Copy,
[wine] / include / ras.h
1 /*
2  * Copyright (C) 1998 Marcus Meissner
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_RAS_H
20 #define __WINE_RAS_H
21
22 #include "windef.h"
23 #include "lmcons.h"
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 #include "pshpack4.h"
29
30 #define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
31 #define RAS_MaxDeviceName     128
32 #define RAS_MaxDeviceType     16
33 #define RAS_MaxEntryName      256
34 #define RAS_MaxPhoneNumber    128
35 #define RAS_MaxAreaCode       10
36 #define RAS_MaxPadType        32
37 #define RAS_MaxX25Address     200
38 #define RAS_MaxFacilities     200
39 #define RAS_MaxUserData       200
40 #define RAS_MaxDnsSuffix      256
41
42 DECLARE_HANDLE(HRASCONN);
43
44 /* szDeviceType strings for RASDEVINFO */
45 #define RASDT_Direct    "direct"
46 #define RASDT_Modem     "modem"
47 #define RASDT_Isdn      "isdn"
48 #define RASDT_X25       "x25"
49
50 #define RASBASE                         600
51 #define ERROR_BUFFER_TOO_SMALL          (RASBASE+3)
52 #define ERROR_INVALID_SIZE              (RASBASE+32)
53
54 typedef struct tagRASDEVINFOA {
55     DWORD    dwSize;
56     CHAR     szDeviceType[ RAS_MaxDeviceType + 1 ];
57     CHAR     szDeviceName[ RAS_MaxDeviceName + 1 ];
58 } RASDEVINFOA, *LPRASDEVINFOA;
59
60 typedef struct tagRASDEVINFOW {
61     DWORD    dwSize;
62     WCHAR    szDeviceType[ RAS_MaxDeviceType + 1 ];
63     WCHAR    szDeviceName[ RAS_MaxDeviceName + 1 ];
64 } RASDEVINFOW, *LPRASDEVINFOW;
65
66 DECL_WINELIB_TYPE_AW(RASDEVINFO)
67 DECL_WINELIB_TYPE_AW(LPRASDEVINFO)
68
69 typedef struct tagRASCONNA {
70     DWORD    dwSize;
71     HRASCONN hRasConn;
72     CHAR     szEntryName[ RAS_MaxEntryName + 1 ];
73     CHAR     szDeviceType[ RAS_MaxDeviceType + 1 ];
74     CHAR     szDeviceName[ RAS_MaxDeviceName + 1 ];
75     CHAR     szPhonebook[ MAX_PATH ];
76     DWORD    dwSubEntry;
77 } RASCONNA,*LPRASCONNA;
78
79 typedef struct tagRASCONNW {
80     DWORD    dwSize;
81     HRASCONN hRasConn;
82     WCHAR    szEntryName[ RAS_MaxEntryName + 1 ];
83     WCHAR    szDeviceType[ RAS_MaxDeviceType + 1 ];
84     WCHAR    szDeviceName[ RAS_MaxDeviceName + 1 ];
85     WCHAR    szPhonebook[ MAX_PATH ];
86     DWORD    dwSubEntry;
87 } RASCONNW,*LPRASCONNW;
88
89 DECL_WINELIB_TYPE_AW(RASCONN)
90 DECL_WINELIB_TYPE_AW(LPRASCONN)
91
92 typedef struct tagRASENTRYNAMEA {
93     DWORD dwSize;
94     CHAR  szEntryName[ RAS_MaxEntryName + 1 ];
95 } RASENTRYNAMEA, *LPRASENTRYNAMEA;
96
97 typedef struct tagRASENTRYNAMEW {
98     DWORD dwSize;
99     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
100 } RASENTRYNAMEW, *LPRASENTRYNAMEW;
101
102 DECL_WINELIB_TYPE_AW(RASENTRYNAME)
103 DECL_WINELIB_TYPE_AW(LPRASENTRYNAME)
104
105 typedef struct tagRASDIALPARAMSA {
106     DWORD dwSize;
107     CHAR szEntryName[ RAS_MaxEntryName + 1 ];
108     CHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
109     CHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
110     CHAR szUserName[ UNLEN + 1 ];
111     CHAR szPassword[ PWLEN + 1 ];
112     CHAR szDomain[ DNLEN + 1 ];
113     DWORD dwSubEntry;
114     DWORD dwCallbackId;
115 } RASDIALPARAMSA, *LPRASDIALPARAMSA;
116
117 typedef struct tagRASDIALPARAMSW {
118     DWORD dwSize;
119     WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
120     WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
121     WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];
122     WCHAR szUserName[ UNLEN + 1 ];
123     WCHAR szPassword[ PWLEN + 1 ];
124     WCHAR szDomain[ DNLEN + 1 ];
125     DWORD dwSubEntry;
126     DWORD dwCallbackId;
127 } RASDIALPARAMSW, *LPRASDIALPARAMSW;
128
129 DECL_WINELIB_TYPE_AW(RASDIALPARAMS)
130 DECL_WINELIB_TYPE_AW(LPRASDIALPARAMS)
131
132 typedef struct tagRASIPADDR {
133         BYTE classA,classB,classC,classD;
134 } RASIPADDR;
135
136 #define RASEO_UseCountryAndAreaCodes    0x0001
137 #define RASEO_SpecificIpAddr            0x0002
138 #define RASEO_SpecificNameServers       0x0004
139 #define RASEO_IpHeaderCompression       0x0008
140 #define RASEO_RemoteDefaultGateway      0x0010
141 #define RASEO_DisableLcpExtensions      0x0020
142 #define RASEO_TerminalBeforeDial        0x0040
143 #define RASEO_TerminalAfterDial         0x0080
144 #define RASEO_ModemLights               0x0100
145 #define RASEO_SwCompression             0x0200
146 #define RASEO_RequireEncryptedPw        0x0400
147 #define RASEO_RequireMsEncryptedPw      0x0800
148 #define RASEO_RequireDataEncryption     0x1000
149 #define RASEO_NetworkLogon              0x2000
150 #define RASEO_UseLogonCredentials       0x4000
151 #define RASEO_PromoteAlternates         0x8000
152 typedef struct tagRASENTRYA {
153     DWORD dwSize;
154     DWORD dwfOptions;
155
156     /* Location */
157
158     DWORD dwCountryID;
159     DWORD dwCountryCode;
160     CHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
161     CHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
162     DWORD dwAlternateOffset;
163
164     /* IP related stuff */
165
166     RASIPADDR ipaddr;
167     RASIPADDR ipaddrDns;
168     RASIPADDR ipaddrDnsAlt;
169     RASIPADDR ipaddrWins;
170     RASIPADDR ipaddrWinsAlt;
171
172     /* Framing (for ppp/isdn etc...) */
173
174     DWORD dwFrameSize;
175     DWORD dwfNetProtocols;
176     DWORD dwFramingProtocol;
177
178     CHAR szScript[ MAX_PATH ];
179
180     CHAR szAutodialDll[ MAX_PATH ];
181     CHAR szAutodialFunc[ MAX_PATH ];
182
183     CHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
184     CHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
185
186     /* x25 only */
187
188     CHAR szX25PadType[ RAS_MaxPadType + 1 ];
189     CHAR szX25Address[ RAS_MaxX25Address + 1 ];
190     CHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
191     CHAR szX25UserData[ RAS_MaxUserData + 1 ];
192     DWORD dwChannels;
193
194     DWORD dwReserved1;
195     DWORD dwReserved2;
196
197     /* Multilink and BAP */
198
199     DWORD dwSubEntries;
200     DWORD dwDialMode;
201     DWORD dwDialExtraPercent;
202     DWORD dwDialExtraSampleSeconds;
203     DWORD dwHangUpExtraPercent;
204     DWORD dwHangUpExtraSampleSeconds;
205
206     /* Idle time out */
207     DWORD dwIdleDisconnectSeconds;
208
209     DWORD dwType;               /* entry type */
210     DWORD dwEncryptionType;     /* type of encryption to use */
211     DWORD dwCustomAuthKey;      /* authentication key for EAP */
212     GUID guidId;                /* guid that represents the phone-book entry  */
213     CHAR szCustomDialDll[MAX_PATH];    /* DLL for custom dialing  */
214     DWORD dwVpnStrategy;         /* specifies type of VPN protocol */
215
216     DWORD dwfOptions2;
217     DWORD dwfOptions3;
218     CHAR szDnsSuffix[RAS_MaxDnsSuffix];
219     DWORD dwTcpWindowSize;
220     CHAR szPrerequisitePbk[MAX_PATH];
221     CHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
222     DWORD dwRedialCount;
223     DWORD dwRedialPause;
224 } RASENTRYA, *LPRASENTRYA;
225
226 typedef struct tagRASENTRYW {
227     DWORD dwSize;
228     DWORD dwfOptions;
229
230     /* Location */
231
232     DWORD dwCountryID;
233     DWORD dwCountryCode;
234     WCHAR szAreaCode[ RAS_MaxAreaCode + 1 ];
235     WCHAR szLocalPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
236     DWORD dwAlternateOffset;
237
238     /* IP related stuff */
239
240     RASIPADDR ipaddr;
241     RASIPADDR ipaddrDns;
242     RASIPADDR ipaddrDnsAlt;
243     RASIPADDR ipaddrWins;
244     RASIPADDR ipaddrWinsAlt;
245
246     /* Framing (for ppp/isdn etc...) */
247
248     DWORD dwFrameSize;
249     DWORD dwfNetProtocols;
250     DWORD dwFramingProtocol;
251
252     WCHAR szScript[ MAX_PATH ];
253
254     WCHAR szAutodialDll[ MAX_PATH ];
255     WCHAR szAutodialFunc[ MAX_PATH ];
256
257     WCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
258     WCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
259
260     /* x25 only */
261
262     WCHAR szX25PadType[ RAS_MaxPadType + 1 ];
263     WCHAR szX25Address[ RAS_MaxX25Address + 1 ];
264     WCHAR szX25Facilities[ RAS_MaxFacilities + 1 ];
265     WCHAR szX25UserData[ RAS_MaxUserData + 1 ];
266     DWORD dwChannels;
267
268     DWORD dwReserved1;
269     DWORD dwReserved2;
270
271     /* Multilink and BAP */
272
273     DWORD dwSubEntries;
274     DWORD dwDialMode;
275     DWORD dwDialExtraPercent;
276     DWORD dwDialExtraSampleSeconds;
277     DWORD dwHangUpExtraPercent;
278     DWORD dwHangUpExtraSampleSeconds;
279
280     /* Idle time out */
281     DWORD dwIdleDisconnectSeconds;
282
283     DWORD dwType;               /* entry type */
284     DWORD dwEncryptionType;     /* type of encryption to use */
285     DWORD dwCustomAuthKey;      /* authentication key for EAP */
286     GUID guidId;                /* guid that represents the phone-book entry  */
287     WCHAR szCustomDialDll[MAX_PATH];    /* DLL for custom dialing  */
288     DWORD dwVpnStrategy;         /* specifies type of VPN protocol */
289
290     DWORD dwfOptions2;
291     DWORD dwfOptions3;
292     WCHAR szDnsSuffix[RAS_MaxDnsSuffix];
293     DWORD dwTcpWindowSize;
294     WCHAR szPrerequisitePbk[MAX_PATH];
295     WCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
296     DWORD dwRedialCount;
297     DWORD dwRedialPause;
298 } RASENTRYW, *LPRASENTRYW;
299
300 DECL_WINELIB_TYPE_AW(RASENTRY)
301
302 DWORD WINAPI RasDeleteEntryA(LPCSTR,LPCSTR);
303 DWORD WINAPI RasDeleteEntryW(LPCWSTR,LPCWSTR);
304 #define      RasDeleteEntry WINELIB_NAME_AW(RasDeleteEntry)
305 DWORD WINAPI RasDeleteSubEntryA(LPCSTR,LPCSTR,DWORD);
306 DWORD WINAPI RasDeleteSubEntryW(LPCWSTR,LPCWSTR,DWORD);
307 #define      RasDeleteSubEntry WINELIB_NAME_AW(RasDeleteSubEntry)
308 DWORD WINAPI RasEnumConnectionsA(LPRASCONNA,LPDWORD,LPDWORD);
309 DWORD WINAPI RasEnumConnectionsW(LPRASCONNW,LPDWORD,LPDWORD);
310 #define      RasEnumConnections WINELIB_NAME_AW(RasEnumConnections)
311 DWORD WINAPI RasEnumEntriesA(LPCSTR,LPCSTR,LPRASENTRYNAMEA,LPDWORD,LPDWORD);
312 DWORD WINAPI RasEnumEntriesW(LPCWSTR,LPCWSTR,LPRASENTRYNAMEW,LPDWORD,LPDWORD);
313 #define      RasEnumEntries WINELIB_NAME_AW(RasEnumEntries)
314 DWORD WINAPI RasGetEntryDialParamsA(LPCSTR,LPRASDIALPARAMSA,LPBOOL);
315 DWORD WINAPI RasGetEntryDialParamsW(LPCWSTR,LPRASDIALPARAMSW,LPBOOL);
316 #define      RasGetEntryDialParams WINELIB_NAME_AW(RasGetEntryDialParams)
317 DWORD WINAPI RasHangUpA(HRASCONN);
318 DWORD WINAPI RasHangUpW(HRASCONN);
319 #define      RasHangUp WINELIB_NAME_AW(RasHangUp)
320 DWORD WINAPI RasValidateEntryNameA(LPCSTR  lpszPhonebook, LPCSTR  lpszEntry);
321 DWORD WINAPI RasValidateEntryNameW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry);
322 #define RasValidateEntryName WINELIB_NAME_AW(RasValidateEntryName)
323 DWORD WINAPI RasSetEntryPropertiesA(LPCSTR lpszPhonebook, LPCSTR lpszEntry,
324         LPRASENTRYA lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
325         DWORD dwDeviceInfoSize);
326 DWORD WINAPI RasSetEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry,
327         LPRASENTRYW lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
328         DWORD dwDeviceInfoSize);
329 #define RasSetEntryProperties WINELIB_NAME_AW(RasSetEntryProperties)
330 DWORD WINAPI RasGetAutodialParamA(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
331 DWORD WINAPI RasGetAutodialParamW(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue);
332 #define RasGetAutodialParam WINELIB_NAME_AW(RasGetAutodialParam)
333 DWORD WINAPI RasSetAutodialEnableA(DWORD dwDialingLocation, BOOL fEnabled);
334 DWORD WINAPI RasSetAutodialEnableW(DWORD dwDialingLocation, BOOL fEnabled);
335 #define RasSetAutodialEnable WINELIB_NAME_AW(RasSetAutodialEnable)
336
337 #include "poppack.h"
338 #ifdef __cplusplus
339 }
340 #endif
341
342 #endif