user32: Add the Romanian translation.
[wine] / dlls / netapi32 / netapi32.c
CommitLineData
e7fd6fd2
JL
1/* Copyright 2001 Mike McCormack
2 * Copyright 2003 Juan Lang
0799c1a7
AJ
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
360a3f91 16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
2e40b964
MM
17 */
18
2663b80f
FG
19#include "config.h"
20
0799c1a7 21#include "wine/debug.h"
74a4e59a 22#include "lm.h"
e7fd6fd2 23#include "netbios.h"
2e40b964 24
0799c1a7 25WINE_DEFAULT_DEBUG_CHANNEL(netbios);
2e40b964 26
9d70a6ee 27static HMODULE NETAPI32_hModule;
2e40b964 28
1e1313d5 29BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
2e40b964 30{
9f71ae87 31 TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
2e40b964
MM
32
33 switch (fdwReason) {
e7fd6fd2
JL
34 case DLL_PROCESS_ATTACH:
35 {
4e1ef0c1 36 DisableThreadLibraryCalls(hinstDLL);
2e40b964 37 NETAPI32_hModule = hinstDLL;
e7fd6fd2
JL
38 NetBIOSInit();
39 NetBTInit();
40 break;
41 }
42 case DLL_PROCESS_DETACH:
43 {
44 NetBIOSShutdown();
45 break;
46 }
2e40b964
MM
47 }
48
49 return TRUE;
50}
51
65dd8741
RR
52/************************************************************
53 * NetServerEnum (NETAPI32.@)
54 */
3e53d11e 55NET_API_STATUS WINAPI NetServerEnum(
9fae03b3 56 LMCSTR servername,
3e53d11e
AS
57 DWORD level,
58 LPBYTE* bufptr,
59 DWORD prefmaxlen,
60 LPDWORD entriesread,
61 LPDWORD totalentries,
62 DWORD servertype,
9fae03b3 63 LMCSTR domain,
3e53d11e
AS
64 LPDWORD resume_handle
65)
66{
9f71ae87 67 FIXME("Stub (%s %d %p %d %p %p %d %s %p)\n", debugstr_w(servername),
1ad8180e
JL
68 level, bufptr, prefmaxlen, entriesread, totalentries, servertype,
69 debugstr_w(domain), resume_handle);
3e53d11e
AS
70
71 return ERROR_NO_BROWSER_SERVERS_FOUND;
72}
23609d22 73
65dd8741
RR
74/************************************************************
75 * NetServerEnumEx (NETAPI32.@)
76 */
77NET_API_STATUS WINAPI NetServerEnumEx(
9fae03b3 78 LMCSTR ServerName,
65dd8741
RR
79 DWORD Level,
80 LPBYTE *Bufptr,
81 DWORD PrefMaxlen,
82 LPDWORD EntriesRead,
83 LPDWORD totalentries,
84 DWORD servertype,
9fae03b3
FG
85 LMCSTR domain,
86 LMCSTR FirstNameToReturn)
65dd8741 87{
9f71ae87 88 FIXME("Stub (%s %d %p %d %p %p %d %s %p)\n", debugstr_w(ServerName),
65dd8741
RR
89 Level, Bufptr, PrefMaxlen, EntriesRead, totalentries, servertype,
90 debugstr_w(domain), debugstr_w(FirstNameToReturn));
91
92 return ERROR_NO_BROWSER_SERVERS_FOUND;
93}
23609d22 94
7e8e1243
HL
95/************************************************************
96 * NetServerGetInfo (NETAPI32.@)
97 */
2f57b9f3 98NET_API_STATUS WINAPI NetServerGetInfo(LMSTR servername, DWORD level, LPBYTE* bufptr)
7e8e1243 99{
9f71ae87 100 FIXME("stub (%p, %d, %p)\n", servername, level, bufptr);
7e8e1243
HL
101 return ERROR_ACCESS_DENIED;
102}
103
104
23609d22
GT
105/************************************************************
106 * NetStatisticsGet (NETAPI32.@)
107 */
9fae03b3 108NET_API_STATUS WINAPI NetStatisticsGet(LMSTR server, LMSTR service,
23609d22
GT
109 DWORD level, DWORD options,
110 LPBYTE *bufptr)
111{
9f71ae87 112 TRACE("(%p, %p, %d, %d, %p)\n", server, service, level, options, bufptr);
23609d22
GT
113 return NERR_InternalError;
114}
93e268ef
JL
115
116DWORD WINAPI NetpNetBiosStatusToApiStatus(DWORD nrc)
117{
118 DWORD ret;
119
120 switch (nrc)
121 {
122 case NRC_GOODRET:
123 ret = NO_ERROR;
124 break;
125 case NRC_NORES:
126 ret = NERR_NoNetworkResource;
127 break;
128 case NRC_DUPNAME:
129 ret = NERR_AlreadyExists;
130 break;
131 case NRC_NAMTFUL:
132 ret = NERR_TooManyNames;
133 break;
134 case NRC_ACTSES:
135 ret = NERR_DeleteLater;
136 break;
137 case NRC_REMTFUL:
138 ret = ERROR_REM_NOT_LIST;
139 break;
140 case NRC_NOCALL:
141 ret = NERR_NameNotFound;
142 break;
143 case NRC_NOWILD:
144 ret = ERROR_INVALID_PARAMETER;
145 break;
146 case NRC_INUSE:
147 ret = NERR_DuplicateName;
148 break;
149 case NRC_NAMERR:
150 ret = ERROR_INVALID_PARAMETER;
151 break;
152 case NRC_NAMCONF:
153 ret = NERR_DuplicateName;
154 break;
155 default:
156 ret = NERR_NetworkError;
157 }
158 return ret;
159}
db994bf6
TS
160
161NET_API_STATUS WINAPI NetUseEnum(LMSTR server, DWORD level, LPBYTE* bufptr, DWORD prefmaxsize,
162 LPDWORD entriesread, LPDWORD totalentries, LPDWORD resumehandle)
163{
164 FIXME("stub (%p, %d, %p, %d, %p, %p, %p)\n", server, level, bufptr, prefmaxsize,
165 entriesread, totalentries, resumehandle);
166 return ERROR_NOT_SUPPORTED;
167}