configure: Print a warning when prelink isn't found.
[wine/hramrach.git] / dlls / wsock32 / service.c
blob17fea61b1de794fd7ccb231bb24ada8954b1d86c
1 /*
2 * WSOCK32 specific functions
4 * Copyright (C) 2002 Andrew Hughes
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 #include "config.h"
23 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winerror.h"
28 #include "winsock2.h"
29 #include "wtypes.h"
30 #include "nspapi.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(winsock);
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)
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);
46 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
47 return SOCKET_ERROR;
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)
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);
60 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
61 return SOCKET_ERROR;
64 /******************************************************************************
65 * GetTypeByNameA [WSOCK32.1113]
67 * Retrieve a service type GUID for a network service specified by name.
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
73 * RETURNS
74 * Success: 0. lpServiceType contains the requested GUID
75 * Failure: SOCKET_ERROR. GetLastError() can return ERROR_SERVICE_DOES_NOT_EXIST
77 * NOTES
78 * Obsolete Microsoft-specific extension to Winsock 1.1.
79 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
81 * BUGS
82 * Unimplemented
84 INT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType)
86 /* tell the user they've got a substandard implementation */
87 FIXME("wsock32: GetTypeByNameA(%p, %p): stub\n", lpServiceName, lpServiceType);
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 */
95 /******************************************************************************
96 * GetTypeByNameW [WSOCK32.1114]
98 * See GetTypeByNameA.
100 INT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType)
102 /* tell the user they've got a substandard implementation */
103 FIXME("wsock32: GetTypeByNameW(%p, %p): stub\n", lpServiceName, lpServiceType);
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 */
110 /******************************************************************************
111 * SetServiceA [WSOCK32.1117]
113 * Register or unregister a network service with one or more namespaces.
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
123 * RETURNS
124 * Success: 0.
125 * Failure: SOCKET_ERROR. GetLastError() can return ERROR_ALREADY_REGISTERED
127 * NOTES
128 * Obsolete Microsoft-specific extension to Winsock 1.1,
129 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
131 * BUGS
132 * Unimplemented.
134 INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
135 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags)
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);
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 */
146 /******************************************************************************
147 * SetServiceW [WSOCK32.1118]
149 * See SetServiceA.
151 INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
152 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags)
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);
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 */
163 /******************************************************************************
164 * GetServiceA [WSOCK32.1119]
166 * Get information about a network service.
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.
181 * RETURNS
182 * Success: 0.
183 * Failure: SOCKET_ERROR. GetLastError() returns ERROR_INSUFFICIENT_BUFFER
184 * or ERROR_SERVICE_NOT_FOUND.
186 * NOTES
187 * Obsolete Microsoft-specific extension to Winsock 1.1,
188 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
190 * BUGS
191 * Unimplemented.
193 INT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
194 DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
195 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo)
197 FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace,
198 lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
200 /* some programs may be able to compensate if they know what happened */
201 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
202 return SOCKET_ERROR;
205 /******************************************************************************
206 * GetServiceW [WSOCK32.1120]
208 * See GetServiceA.
210 INT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
211 DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
212 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo)
214 FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace,
215 lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
217 /* some programs may be able to compensate if they know what happened */
218 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
219 return SOCKET_ERROR;