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
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(winsock
);
34 INT WINAPI
GetAddressByNameA(DWORD dwNameSpace
, LPGUID lpServiceType
, LPSTR lpServiceName
,
35 LPINT lpiProtocols
, DWORD dwResolution
, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo
,
36 LPVOID lpCsaddrBuffer
, LPDWORD lpdwBufferLength
, LPSTR lpAliasBuffer
,
37 LPDWORD lpdwAliasBufferLength
)
39 FIXME("(0x%08x, %s, %s, %p, 0x%08x, %p, %p, %p, %p, %p) stub\n", dwNameSpace
,
40 debugstr_guid(lpServiceType
), debugstr_a(lpServiceName
), lpiProtocols
,
41 dwResolution
, lpServiceAsyncInfo
, lpCsaddrBuffer
, lpdwBufferLength
,
42 lpAliasBuffer
, lpdwAliasBufferLength
);
44 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
48 INT WINAPI
GetAddressByNameW(DWORD dwNameSpace
, LPGUID lpServiceType
, LPWSTR lpServiceName
,
49 LPINT lpiProtocols
, DWORD dwResolution
, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo
,
50 LPVOID lpCsaddrBuffer
, LPDWORD lpdwBufferLength
, LPWSTR lpAliasBuffer
,
51 LPDWORD lpdwAliasBufferLength
)
53 FIXME("(0x%08x, %s, %s, %p, 0x%08x, %p, %p, %p, %p, %p) stub\n", dwNameSpace
,
54 debugstr_guid(lpServiceType
), debugstr_w(lpServiceName
), lpiProtocols
,
55 dwResolution
, lpServiceAsyncInfo
, lpCsaddrBuffer
, lpdwBufferLength
,
56 lpAliasBuffer
, lpdwAliasBufferLength
);
58 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
62 /******************************************************************************
63 * GetTypeByNameA [WSOCK32.1113]
65 * Retrieve a service type GUID for a network service specified by name.
68 * lpServiceName [I] NUL-terminated ASCII string that uniquely represents the name of the service
69 * lpServiceType [O] Destination for the service type GUID
72 * Success: 0. lpServiceType contains the requested GUID
73 * Failure: SOCKET_ERROR. GetLastError() can return ERROR_SERVICE_DOES_NOT_EXIST
76 * Obsolete Microsoft-specific extension to Winsock 1.1.
77 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
82 INT WINAPI
GetTypeByNameA(LPSTR lpServiceName
, LPGUID lpServiceType
)
84 /* tell the user they've got a substandard implementation */
85 FIXME("wsock32: GetTypeByNameA(%p, %p): stub\n", lpServiceName
, lpServiceType
);
87 /* some programs may be able to compensate if they know what happened */
88 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
89 return SOCKET_ERROR
; /* error value */
93 /******************************************************************************
94 * GetTypeByNameW [WSOCK32.1114]
98 INT WINAPI
GetTypeByNameW(LPWSTR lpServiceName
, LPGUID lpServiceType
)
100 /* tell the user they've got a substandard implementation */
101 FIXME("wsock32: GetTypeByNameW(%p, %p): stub\n", lpServiceName
, lpServiceType
);
103 /* some programs may be able to compensate if they know what happened */
104 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
105 return SOCKET_ERROR
; /* error value */
108 /******************************************************************************
109 * SetServiceA [WSOCK32.1117]
111 * Register or unregister a network service with one or more namespaces.
114 * dwNameSpace [I] Name space or set of name spaces within which the function will operate
115 * dwOperation [I] Operation to perform
116 * dwFlags [I] Flags to modify the function's operation
117 * lpServiceInfo [I] Pointer to a ASCII SERVICE_INFO structure
118 * lpServiceAsyncInfo [I] Reserved for future use. Must be NULL.
119 * lpdwStatusFlags [O] Destination for function status information
123 * Failure: SOCKET_ERROR. GetLastError() can return ERROR_ALREADY_REGISTERED
126 * Obsolete Microsoft-specific extension to Winsock 1.1,
127 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
132 INT WINAPI
SetServiceA(DWORD dwNameSpace
, DWORD dwOperation
, DWORD dwFlags
, LPSERVICE_INFOA lpServiceInfo
,
133 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo
, LPDWORD lpdwStatusFlags
)
135 /* tell the user they've got a substandard implementation */
136 FIXME("wsock32: SetServiceA(%u, %u, %u, %p, %p, %p): stub\n", dwNameSpace
, dwOperation
, dwFlags
,
137 lpServiceInfo
, lpServiceAsyncInfo
, lpdwStatusFlags
);
139 /* some programs may be able to compensate if they know what happened */
140 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
141 return SOCKET_ERROR
; /* error value */
144 /******************************************************************************
145 * SetServiceW [WSOCK32.1118]
149 INT WINAPI
SetServiceW(DWORD dwNameSpace
, DWORD dwOperation
, DWORD dwFlags
, LPSERVICE_INFOW lpServiceInfo
,
150 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo
, LPDWORD lpdwStatusFlags
)
152 /* tell the user they've got a substandard implementation */
153 FIXME("wsock32: SetServiceW(%u, %u, %u, %p, %p, %p): stub\n", dwNameSpace
, dwOperation
, dwFlags
,
154 lpServiceInfo
, lpServiceAsyncInfo
, lpdwStatusFlags
);
156 /* some programs may be able to compensate if they know what happened */
157 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
158 return SOCKET_ERROR
; /* error value */
161 /******************************************************************************
162 * GetServiceA [WSOCK32.1119]
164 * Get information about a network service.
167 * dwNameSpace [I] Name space or set of name spaces within which the function
169 * lpGuid [I] Pointer to GUID of network service type.
170 * lpServiceName [I] NUL-terminated ASCII string that uniquely represents the name
172 * dwProperties [I] Flags specifying which information to return in lpBuffer.
173 * lpBuffer [O] Pointer to buffer where the function returns an array
174 * of NS_SERVICE_INFO.
175 * lpdwBufferSize [I/O] Size of lpBuffer. A greater number on output
176 * indicates an error.
177 * lpServiceAsyncInfo [O] Reserved. Set to NULL.
181 * Failure: SOCKET_ERROR. GetLastError() returns ERROR_INSUFFICIENT_BUFFER
182 * or ERROR_SERVICE_NOT_FOUND.
185 * Obsolete Microsoft-specific extension to Winsock 1.1,
186 * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
191 INT WINAPI
GetServiceA(DWORD dwNameSpace
, LPGUID lpGuid
, LPSTR lpServiceName
,
192 DWORD dwProperties
, LPVOID lpBuffer
, LPDWORD lpdwBufferSize
,
193 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo
)
195 FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace
,
196 lpGuid
, lpServiceName
, dwProperties
, lpBuffer
, lpdwBufferSize
, lpServiceAsyncInfo
);
198 /* some programs may be able to compensate if they know what happened */
199 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
203 /******************************************************************************
204 * GetServiceW [WSOCK32.1120]
208 INT WINAPI
GetServiceW(DWORD dwNameSpace
, LPGUID lpGuid
, LPSTR lpServiceName
,
209 DWORD dwProperties
, LPVOID lpBuffer
, LPDWORD lpdwBufferSize
,
210 LPSERVICE_ASYNC_INFO lpServiceAsyncInfo
)
212 FIXME("(%u, %p, %s, %u, %p, %p, %p): stub\n", dwNameSpace
,
213 lpGuid
, lpServiceName
, dwProperties
, lpBuffer
, lpdwBufferSize
, lpServiceAsyncInfo
);
215 /* some programs may be able to compensate if they know what happened */
216 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);