1 /* NSPAPI.H -- winsock 1.1
2 * not supported on win95
4 * Copyright (C) 2001 Stefan Leichter
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #endif /* defined(__cplusplus) */
30 #define XP_CONNECTIONLESS 0x00000001
31 #define XP_GUARANTEED_DELIVERY 0x00000002
32 #define XP_GUARANTEED_ORDER 0x00000004
33 #define XP_MESSAGE_ORIENTED 0x00000008
34 #define XP_PSEUDO_STREAM 0x00000010
35 #define XP_GRACEFUL_CLOSE 0x00000020
36 #define XP_EXPEDITED_DATA 0x00000040
37 #define XP_CONNECT_DATA 0x00000080
38 #define XP_DISCONNECT_DATA 0x00000100
39 #define XP_SUPPORTS_BROADCAST 0x00000200
40 #define XP_SUPPORTS_MULTICAST 0x00000400
41 #define XP_BANDWITH_ALLOCATION 0x00000800
42 #define XP_FRAGMENTATION 0x00001000
43 #define XP_ENCRYPTS 0x00002000
48 typedef struct _PROTOCOL_INFOA
58 } PROTOCOL_INFOA, *PPROTOCOL_INFOA, *LPPROTOCOL_INFOA;
60 typedef struct _PROTOCOL_INFOW
70 } PROTOCOL_INFOW, *PPROTOCOL_INFOW, *LPPROTOCOL_INFOW;
72 DECL_WINELIB_TYPE_AW(PROTOCOL_INFO)
73 DECL_WINELIB_TYPE_AW(PPROTOCOL_INFO)
74 DECL_WINELIB_TYPE_AW(LPPROTOCOL_INFO)
76 typedef struct _SERVICE_ADDRESS
80 DWORD dwAddressLength;
81 DWORD dwPrincipalLength;
84 } SERVICE_ADDRESS, *PSERVICE_ADDRESS, *LPSERVICE_ADDRESS;
86 typedef struct _SERVICE_ADDRESSES
89 SERVICE_ADDRESS Addresses[1];
90 } SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
92 typedef struct _SERVICE_INFOA
102 LPSERVICE_ADDRESSES lpServiceAddress;
103 BLOB ServiceSpecificInfo;
104 } SERVICE_INFOA, *PSERVICE_INFOA, *LPSERVICE_INFOA;
106 typedef struct _SERVICE_INFOW
108 LPGUID lpServiceType;
109 LPWSTR lpServiceName;
116 LPSERVICE_ADDRESSES lpServiceAddress;
117 BLOB ServiceSpecificInfo; /* May point to SERVICE_TYPE_INFO_ABS */
118 } SERVICE_INFOW, *PSERVICE_INFOW, *LPSERVICE_INFOW;
120 DECL_WINELIB_TYPE_AW(SERVICE_INFO)
121 DECL_WINELIB_TYPE_AW(PSERVICE_INFO)
122 DECL_WINELIB_TYPE_AW(LPSERVICE_INFO)
124 typedef struct _SERVICE_TYPE_VALUE_ABSA
126 DWORD dwNameSpace; /* Name space or set of name spaces */
127 DWORD dwValueType; /* Type of the value data */
128 DWORD dwValueSize; /* Size of the value data */
129 LPSTR lpValueName; /* Name of the value */
130 PVOID lpValue; /* Pointer to the value data */
131 } SERVICE_TYPE_VALUE_ABSA, *PSERVICE_TYPE_VALUE_ABSA, *LPSERVICE_TYPE_VALUE_ABSA;
133 typedef struct _SERVICE_TYPE_VALUE_ABSW
135 DWORD dwNameSpace; /* Name space or set of name spaces */
136 DWORD dwValueType; /* Type of the value data */
137 DWORD dwValueSize; /* Size of the value data */
138 LPWSTR lpValueName; /* Name of the value */
139 PVOID lpValue; /* Pointer to the value data */
140 } SERVICE_TYPE_VALUE_ABSW, *PSERVICE_TYPE_VALUE_ABSW, *LPSERVICE_TYPE_VALUE_ABSW;
142 DECL_WINELIB_TYPE_AW(SERVICE_TYPE_VALUE_ABS)
143 DECL_WINELIB_TYPE_AW(PSERVICE_TYPE_VALUE_ABS)
144 DECL_WINELIB_TYPE_AW(LPSERVICE_TYPE_VALUE_ABS)
146 typedef struct _SERVICE_TYPE_INFO_ABSA
148 LPSTR lpTypeName; /* Name of the network service type */
149 DWORD dwValueCount; /* Number of SERVICE_TYPE_VALUE_ABS structures */
150 SERVICE_TYPE_VALUE_ABSA Values[1]; /* Array of SERVICE_TYPE_VALUE_ABS structures */
151 } SERVICE_TYPE_INFO_ABSA, *PSERVICE_TYPE_INFO_ABSA, *LPSERVICE_TYPE_INFO_ABSA;
153 typedef struct _SERVICE_TYPE_INFO_ABSW
155 LPWSTR lpTypeName; /* Name of the network service type */
156 DWORD dwValueCount; /* Number of SERVICE_TYPE_VALUE_ABS structures */
157 SERVICE_TYPE_VALUE_ABSW Values[1]; /* Array of SERVICE_TYPE_VALUE_ABS structures */
158 } SERVICE_TYPE_INFO_ABSW, *PSERVICE_TYPE_INFO_ABSW, *LPSERVICE_TYPE_INFO_ABSW;
160 DECL_WINELIB_TYPE_AW(SERVICE_TYPE_INFO_ABS)
161 DECL_WINELIB_TYPE_AW(PSERVICE_TYPE_INFO_ABS)
162 DECL_WINELIB_TYPE_AW(LPSERVICE_TYPE_INFO_ABS)
164 typedef void (*LPSERVICE_CALLBACK_PROC)(LPARAM lParam, HANDLE hAsyncTaskHandle);
166 typedef struct _SERVICE_ASYNC_INFO
168 LPSERVICE_CALLBACK_PROC lpServiceCallbackProc;
170 HANDLE hAsyncTaskHandle;
171 } SERVICE_ASYNC_INFO, *PSERVICE_ASYNC_INFO, *LPSERVICE_ASYNC_INFO;
174 * function prototypes
176 INT WINAPI GetAddressByNameA(DWORD dwNameSpace, LPGUID lpServiceType, LPSTR lpServiceName,
177 LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
178 LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPSTR lpAliasBuffer,
179 LPDWORD lpdwAliasBufferLength);
180 INT WINAPI GetAddressByNameW(DWORD dwNameSpace, LPGUID lpServiceType, LPWSTR lpServiceName,
181 LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
182 LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPWSTR lpAliasBuffer,
183 LPDWORD lpdwAliasBufferLength);
184 #define GetAddressByName WINELIB_NAME_AW(GetAddressByName)
185 INT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType);
186 INT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType);
187 #define GetTypeByName WINELIB_NAME_AW(GetTypeByName)
188 INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
189 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
190 INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
191 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
192 #define SetService WINELIB_NAME_AW(SetService)
196 #endif /* defined(__cplusplus) */
198 #endif /* _WINE_NSPAPI_ */