Module: wine Branch: refs/heads/master Commit: e29dd373b2ab5e7f9be123d048cfcc23f9c9441f URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e29dd373b2ab5e7f9be123d0...
Author: Paul Vriens paul.vriens@xs4all.nl Date: Thu Apr 6 14:34:14 2006 +0200
netapi32: Add (stubbed) NetSessionEnum.
---
dlls/netapi32/Makefile.in | 1 + dlls/netapi32/netapi32.spec | 2 + dlls/netapi32/share.c | 58 +++++++++++++++++++++++++++++++++++++++++++ include/lmshare.h | 4 +++ 4 files changed, 64 insertions(+), 1 deletions(-) create mode 100644 dlls/netapi32/share.c
diff --git a/dlls/netapi32/Makefile.in b/dlls/netapi32/Makefile.in index b898d10..d172ce7 100644 --- a/dlls/netapi32/Makefile.in +++ b/dlls/netapi32/Makefile.in @@ -17,6 +17,7 @@ C_SRCS = \ nbt.c \ netapi32.c \ netbios.c \ + share.c \ wksta.c
SUBDIRS = tests diff --git a/dlls/netapi32/netapi32.spec b/dlls/netapi32/netapi32.spec index dbb42c4..c92b59a 100644 --- a/dlls/netapi32/netapi32.spec +++ b/dlls/netapi32/netapi32.spec @@ -184,7 +184,7 @@ @ stub NetServiceGetInfo @ stub NetServiceInstall @ stub NetSessionDel -@ stub NetSessionEnum +@ stdcall NetSessionEnum(wstr wstr wstr long ptr long ptr ptr ptr) @ stub NetSessionGetInfo @ stub NetShareAdd @ stub NetShareCheck diff --git a/dlls/netapi32/share.c b/dlls/netapi32/share.c new file mode 100644 index 0000000..c81381e --- /dev/null +++ b/dlls/netapi32/share.c @@ -0,0 +1,58 @@ +/* Copyright 2006 Paul Vriens + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "wine/debug.h" +#include "lm.h" + +WINE_DEFAULT_DEBUG_CHANNEL(share); + +/************************************************************ + * NetSessionEnum (NETAPI32.@) + * + * PARAMS + * servername [I] Pointer to a string with the name of the server + * UncClientName [I] Pointer to a string with the name of the session + * username [I] Pointer to a string with the name of the user + * level [I] Data information level + * bufptr [O] Buffer to the data + * prefmaxlen [I] Preferred maximum length of the data + * entriesread [O] Pointer to the number of entries enumerated + * totalentries [O] Pointer to the possible number of entries + * resume_handle [I/O] Pointer to a handle for subsequent searches + * + * RETURNS + * If successful, the function returns NERR_Success + * On failure it returns: + * ERROR_ACCESS_DENIED User has no access to the requested information + * ERROR_INVALID_LEVEL Value of 'level' is not correct + * ERROR_INVALID_PARAMETER Wrong parameter + * ERROR_MORE_DATA Need a larger buffer + * ERROR_NOT_ENOUGH_MEMORY Not enough memory + * NERR_ClientNameNotFound A session does not exist on a given computer + * NERR_InvalidComputer Invalid computer name + * NERR_UserNotFound User name could not be found. + */ +NET_API_STATUS WINAPI NetSessionEnum(LPWSTR servername, LPWSTR UncClientName, + LPWSTR username, DWORD level, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread, + LPDWORD totalentries, LPDWORD resume_handle) +{ + FIXME("Stub (%s %s %s %ld %p %ld %p %p %p)\n", debugstr_w(servername), + debugstr_w(UncClientName), debugstr_w(username), + level, bufptr, prefmaxlen, entriesread, totalentries, resume_handle); + + return NERR_Success; +} diff --git a/include/lmshare.h b/include/lmshare.h index 9cace8e..8c7c83c 100644 --- a/include/lmshare.h +++ b/include/lmshare.h @@ -42,6 +42,10 @@ NET_API_STATUS WINAPI NetShareEnum(LMSTR #define STYPE_IPC 3 #define STYPE_SPECIAL 0x80000000
+NET_API_STATUS NET_API_FUNCTION NetSessionEnum(LMSTR servername, LMSTR UncClientName, + LMSTR username, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, + LPDWORD totalentries, LPDWORD resume_handle); + #ifdef __cplusplus } #endif