Release 1.3.7.
[wine/gsoc-2012-control.git] / dlls / netapi32 / share.c
blob344bf0dbd8845234ad201152c983744495768360
1 /* Copyright 2006 Paul Vriens
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #include "wine/debug.h"
19 #include "lm.h"
20 #include "winerror.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(share);
24 /************************************************************
25 * NetSessionEnum (NETAPI32.@)
27 * PARAMS
28 * servername [I] Pointer to a string with the name of the server
29 * UncClientName [I] Pointer to a string with the name of the session
30 * username [I] Pointer to a string with the name of the user
31 * level [I] Data information level
32 * bufptr [O] Buffer to the data
33 * prefmaxlen [I] Preferred maximum length of the data
34 * entriesread [O] Pointer to the number of entries enumerated
35 * totalentries [O] Pointer to the possible number of entries
36 * resume_handle [I/O] Pointer to a handle for subsequent searches
38 * RETURNS
39 * If successful, the function returns NERR_Success
40 * On failure it returns:
41 * ERROR_ACCESS_DENIED User has no access to the requested information
42 * ERROR_INVALID_LEVEL Value of 'level' is not correct
43 * ERROR_INVALID_PARAMETER Wrong parameter
44 * ERROR_MORE_DATA Need a larger buffer
45 * ERROR_NOT_ENOUGH_MEMORY Not enough memory
46 * NERR_ClientNameNotFound A session does not exist on a given computer
47 * NERR_InvalidComputer Invalid computer name
48 * NERR_UserNotFound User name could not be found.
50 NET_API_STATUS WINAPI NetSessionEnum(LMSTR servername, LMSTR UncClientName,
51 LMSTR username, DWORD level, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread,
52 LPDWORD totalentries, LPDWORD resume_handle)
54 FIXME("Stub (%s %s %s %d %p %d %p %p %p)\n", debugstr_w(servername),
55 debugstr_w(UncClientName), debugstr_w(username),
56 level, bufptr, prefmaxlen, entriesread, totalentries, resume_handle);
58 return NERR_Success;
61 /************************************************************
62 * NetShareEnum (NETAPI32.@)
64 * PARAMS
65 * servername [I] Pointer to a string with the name of the server
66 * level [I] Data information level
67 * bufptr [O] Buffer to the data
68 * prefmaxlen [I] Preferred maximum length of the data
69 * entriesread [O] Pointer to the number of entries enumerated
70 * totalentries [O] Pointer to the possible number of entries
71 * resume_handle [I/O] Pointer to a handle for subsequent searches
73 * RETURNS
74 * If successful, the function returns NERR_Success
75 * On failure it returns a system error code (FIXME: find out which)
78 NET_API_STATUS WINAPI NetShareEnum( LMSTR servername, DWORD level, LPBYTE* bufptr,
79 DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle)
81 FIXME("Stub (%s %d %p %d %p %p %p)\n", debugstr_w(servername), level, bufptr,
82 prefmaxlen, entriesread, totalentries, resume_handle);
84 return ERROR_NOT_SUPPORTED;
87 /************************************************************
88 * NetShareDel (NETAPI32.@)
90 NET_API_STATUS WINAPI NetShareDel(LMSTR servername, LMSTR netname, DWORD reserved)
92 FIXME("Stub (%s %s %d)\n", debugstr_w(servername), debugstr_w(netname), reserved);
93 return NERR_Success;
96 /************************************************************
97 * NetShareGetInfo (NETAPI32.@)
99 NET_API_STATUS WINAPI NetShareGetInfo(LMSTR servername, LMSTR netname,
100 DWORD level, LPBYTE *bufptr)
102 FIXME("Stub (%s %s %d %p)\n", debugstr_w(servername),
103 debugstr_w(netname),level, bufptr);
104 return NERR_NetNameNotFound;
107 /************************************************************
108 * NetShareAdd (NETAPI32.@)
110 NET_API_STATUS WINAPI NetShareAdd(LMSTR servername,
111 DWORD level, LPBYTE buf, LPDWORD parm_err)
113 FIXME("Stub (%s %d %p %p)\n", debugstr_w(servername), level, buf, parm_err);
114 return ERROR_NOT_SUPPORTED;
117 /************************************************************
118 * NetFileEnum (NETAPI32.@)
120 NET_API_STATUS WINAPI NetFileEnum(
121 LPWSTR ServerName, LPWSTR BasePath, LPWSTR UserName,
122 DWORD Level, LPBYTE* BufPtr, DWORD PrefMaxLen,
123 LPDWORD EntriesRead, LPDWORD TotalEntries, PDWORD_PTR ResumeHandle)
125 FIXME("(%s, %s, %s, %u): stub\n", debugstr_w(ServerName), debugstr_w(BasePath),
126 debugstr_w(UserName), Level);
127 return ERROR_NOT_SUPPORTED;