Add Mach-O (Darwin file format) support.
[wine] / dlls / wsock32 / service.c
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "config.h"
22
23 #include "winbase.h"
24 #include "winerror.h"
25 #include "winsock2.h"
26 #include "wtypes.h"
27 #include "nspapi.h"
28
29 #include "wine/debug.h"
30
31 WINE_DEFAULT_DEBUG_CHANNEL(winsock);
32
33 /******************************************************************************
34  *          GetTypeByNameA     [WSOCK32.1113]
35  *
36  * Retrieve a service type GUID for a network service specified by name.
37  *
38  * PARAMETERS
39  *      lpServiceName [I] NUL-terminated ASCII string that uniquely represents the name of the service
40  *      lpServiceType [O] Destination for the service type GUID
41  *
42  * RETURNS
43  *      Success: 0. lpServiceType contains the requested GUID
44  *      Failure: SOCKET_ERROR. GetLastError() can return ERROR_SERVICE_DOES_NOT_EXIST
45  *
46  * NOTES
47  *      Obsolete Microsoft-specific extension to Winsock 1.1.
48  *      Protocol-independent name resolution provides equivalent functionality in Winsock 2.
49  *
50  * BUGS
51  *      Unimplemented
52  */
53 INT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType)
54 {
55    /* tell the user they've got a substandard implementation */
56    FIXME("wsock32: GetTypeByNameA(%p, %p): stub/n", lpServiceName, lpServiceType);
57    
58    /* some programs may be able to compensate if they know what happened */
59    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
60    return SOCKET_ERROR; /* error value */
61 }
62
63
64 /******************************************************************************
65  *          GetTypeByNameW     [WSOCK32.1114]
66  *
67  * See GetTypeByNameA.
68  */
69 INT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType)
70 {
71     /* tell the user they've got a substandard implementation */
72     FIXME("wsock32: GetTypeByNameW(%p, %p): stub/n", lpServiceName, lpServiceType);
73     
74     /* some programs may be able to compensate if they know what happened */
75     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
76     return SOCKET_ERROR; /* error value */
77 }
78
79 /******************************************************************************
80  *          SetServiceA     [WSOCK32.1117]
81  *
82  * Register or unregister a network service with one or more namespaces.
83  *
84  * PARAMETERS
85  *      dwNameSpace        [I] Name space or set of name spaces within which the function will operate
86  *      dwOperation        [I] Operation to perform
87  *      dwFlags            [I] Flags to modify the function's operation
88  *      lpServiceInfo      [I] Pointer to a ASCII SERVICE_INFO structure
89  *      lpServiceAsyncInfo [I] Reserved for future use.  Must be NULL.
90  *      lpdwStatusFlags    [O] Destination for function status information
91  *
92  * RETURNS
93  *      Success: 0.
94  *      Failure: SOCKET_ERROR. GetLastError() can return ERROR_ALREADY_REGISTERED
95  *
96  * NOTES
97  *      Obsolete Microsoft-specific extension to Winsock 1.1,
98  *      Protocol-independent name resolution provides equivalent functionality in Winsock 2.
99  *
100  * BUGS
101  *      Unimplemented.
102  */
103 INT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
104                        LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags)
105 {
106    /* tell the user they've got a substandard implementation */
107    FIXME("wsock32: SetServiceA(%lu, %lu, %lu, %p, %p, %p): stub/n", dwNameSpace, dwOperation, dwFlags,
108            lpServiceInfo, lpServiceAsyncInfo, lpdwStatusFlags);
109     
110    /* some programs may be able to compensate if they know what happened */
111    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
112    return SOCKET_ERROR; /* error value */ 
113 }
114
115 /******************************************************************************
116  *          SetServiceW     [WSOCK32.1118]
117  *
118  * See SetServiceA.
119  */
120 INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
121                        LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags)
122 {
123    /* tell the user they've got a substandard implementation */
124    FIXME("wsock32: SetServiceW(%lu, %lu, %lu, %p, %p, %p): stub/n", dwNameSpace, dwOperation, dwFlags,
125            lpServiceInfo, lpServiceAsyncInfo, lpdwStatusFlags);
126     
127    /* some programs may be able to compensate if they know what happened */
128    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
129    return SOCKET_ERROR; /* error value */ 
130 }