1 /*
2 * WSOCK32 specific functions
3 *
4 * Copyright (C) 2002 Andrew Hughes
5 *
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.
10 *
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.
15 *
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
19 */
20
21 #include "config.h"
22
23 #include <stdarg.h>
24
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winerror.h"
28 #include "winsock2.h"
29 #include "wtypes.h"
30 #include "nspapi.h"
31
32 #include "wine/debug.h"
33
34 WINE_DEFAULT_DEBUG_CHANNEL(winsock);
35
36 INT WINAPI GetAddressByNameA(DWORD dwNameSpace, LPGUID lpServiceType, LPSTR lpServiceName,
37 LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
38 LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPSTR lpAliasBuffer,
39 LPDWORD lpdwAliasBufferLength)
40 {
41 FIXME("(0x%08x, %s, %s, %p, 0x%08x, %p, %p, %p, %p, %p) stub\n", dwNameSpace,
42 debugstr_guid(lpServiceType), debugstr_a(lpServiceName), lpiProtocols,
43 dwResolution, lpServiceAsyncInfo, lpCsaddrBuffer, lpdwBufferLength,
44 lpAliasBuffer, lpdwAliasBufferLength);
45
46 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
47 return SOCKET_ERROR;
48 }
49
50 INT WINAPI GetAddressByNameW(DWORD dwNameSpace, LPGUID lpServiceType, LPWSTR lpServiceName,
51 LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
52 LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPWSTR lpAliasBuffer,
53 LPDWORD lpdwAliasBufferLength)
54 {
55 FIXME("(0x%08x, %s, %s, %p, 0x%08x, %p, %p, %p, %p, %p) stub\n", dwNameSpace,
56 debugstr_guid(lpServiceType), debugstr_w(lpServiceName), lpiProtocols,
57 dwResolution, lpServiceAsyncInfo, lpCsaddrBuffer, lpdwBufferLength,
58 lpAliasBuffer, lpdwAliasBufferLength);
59
60 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
61 return SOCKET_ERROR;
62 }
63
64 /******************************************************************************
65 * GetTypeByNameA [WSOCK32.1113]
66 *
67 * Retrieve a service type GUID for a network service specified by name.
68 *
69 * PARAMETERS
70 * lpServiceName [I] NUL-terminated ASCII string that uniquely represents the name of the service
71 * lpServiceType [O] Destination for the service type GUID
72 *
73 * RETURNS
74 * Success: 0. lpServiceType contains the requested GUID
75 * Failure: SOCKET_ERROR. GetLastError() can return ERROR_SERVICE_DOES_NOT_EXIST
76 *
77 * NOTES
78 * Obsolete Microsoft-specific extension to Winsock 1.1.
79 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
80 *
81 * BUGS
82 * Unimplemented
83 */
84 INT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType)
85 {
86 /* tell the user they've got a substandard implementation */
87 FIXME("wsock32: GetTypeByNameA(%p, %p): stub\n", lpServiceName, lpServiceType);
88
89 /* some programs may be able to compensate if they know what happened */
90 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
91 return SOCKET_ERROR; /* error value */
92 }
93
94
95 /******************************************************************************
96 * GetTypeByNameW [WSOCK32.1114]
97 *
98 * See GetTypeByNameA.
99 */
100 INT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType)
101 {
102 /* tell the user they've got a substandard implementation */
103 FIXME("wsock32: GetTypeByNameW(%p, %p): stub\n", lpServiceName, lpServiceType);
104
105 /* some programs may be able to compensate if they know what happened */
106 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
107 return SOCKET_ERROR; /* error value */
108 }
109
110 /******************************************************************************
111 * SetServiceA [WSOCK32.1117]
112 *
113 * Register or unregister a network service with one or more namespaces.
114 *
115 * PARAMETERS
116 * dwNameSpace [I] Name space or set of name spaces within which the function will operate
117 * dwOperation [I] Operation to perform
118 * dwFlags [I] Flags to modify the function's operation
119 * lpServiceInfo [I] Pointer to a ASCII SERVICE_INFO structure
120 * lpServiceAsyncInfo [I] Reserved for future use. Must be NULL.
121 * lpdwStatusFlags [O] Destination for function status information
122 *
123 * RETURNS
124 * Success: 0.
125 * Failure: SOCKET_ERROR. GetLastError() can return ERROR_ALREADY_REGISTERED
126 *
127 * NOTES
128 * Obsolete Microsoft-specific extension to Winsock 1.1,
129 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
130 *
131 * BUGS
132 * Unimplemented.
133 */
134 INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
135 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags)
136 {
137 /* tell the user they've got a substandard implementation */
138 FIXME("wsock32: SetServiceA(%u, %u, %u, %p, %p, %p): stub\n", dwNameSpace, dwOperation, dwFlags,
139 lpServiceInfo, lpServiceAsyncInfo, lpdwStatusFlags);
140
141 /* some programs may be able to compensate if they know what happened */
142 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
143 return SOCKET_ERROR; /* error value */
144 }
145
146 /******************************************************************************
147 * SetServiceW [WSOCK32.1118]
148 *
149 * See SetServiceA.
150 */
151 INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
152 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags)
153 {
154 /* tell the user they've got a substandard implementation */
155 FIXME("wsock32: SetServiceW(%u, %u, %u, %p, %p, %p): stub\n", dwNameSpace, dwOperation, dwFlags,
156 lpServiceInfo, lpServiceAsyncInfo, lpdwStatusFlags);
157
158 /* some programs may be able to compensate if they know what happened */
159 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
160 return SOCKET_ERROR; /* error value */
161 }
162
163 /******************************************************************************
164 * GetServiceA [WSOCK32.1119]
165 *
166 * Get information about a network service.
167 *
168 * PARAMETERS
169 * dwNameSpace [I] Name space or set of name spaces within which the function
170 * will operate.
171 * lpGuid [I] Pointer to GUID of network service type.
172 * lpServiceName [I] NUL-terminated ASCII string that uniquely represents the name
173 * of the service.
174 * dwProperties [I] Flags specifying which information to return in lpBuffer.
175 * lpBuffer [O] Pointer to buffer where the function returns an array
176 * of NS_SERVICE_INFO.
177 * lpdwBufferSize [I/O] Size of lpBuffer. A greater number on output
178 * indicates an error.
179 * lpServiceAsyncInfo [O] Reserved. Set to NULL.
180 *
181 * RETURNS
182 * Success: 0.
183 * Failure: SOCKET_ERROR. GetLastError() returns ERROR_INSUFFICIENT_BUFFER
184 * or ERROR_SERVICE_NOT_FOUND.
185 *
186 * NOTES
187 * Obsolete Microsoft-specific extension to Winsock 1.1,
188 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
189 *
190 * BUGS
191 * Unimplemented.
192 */
193 INT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
194 DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
195 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo)
196 {
197 FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace,
198 lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
199
200 /* some programs may be able to compensate if they know what happened */
201 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
202 return SOCKET_ERROR;
203 }
204
205 /******************************************************************************
206 * GetServiceW [WSOCK32.1120]
207 *
208 * See GetServiceA.
209 */
210 INT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
211 DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
212 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo)
213 {
214 FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace,
215 lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
216
217 /* some programs may be able to compensate if they know what happened */
218 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
219 return SOCKET_ERROR;
220 }
221
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.