From ae1fde034393a780f41578ea8e22dc63a033ab07 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Sun, 18 Feb 2007 19:37:37 +0100 Subject: [PATCH] netapi32: Add a stub implementation for NetShareDel. Improve the stub for NetUserGetLocalGroups. --- dlls/netapi32/access.c | 16 +++++++++++++++- dlls/netapi32/netapi32.spec | 2 +- dlls/netapi32/share.c | 9 +++++++++ include/lmaccess.h | 1 + include/lmshare.h | 1 + 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/netapi32/access.c b/dlls/netapi32/access.c index b9155e55d3a..78611402389 100644 --- a/dlls/netapi32/access.c +++ b/dlls/netapi32/access.c @@ -310,10 +310,24 @@ NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level, DWORD flags, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries) { + NET_API_STATUS status; + FIXME("(%s, %s, %d, %08x, %p %d, %p, %p) stub!\n", debugstr_w(servername), debugstr_w(username), level, flags, bufptr, prefmaxlen, entriesread, totalentries); - return NERR_InternalError; + + status = NETAPI_ValidateServername(servername); + if (status != NERR_Success) + return status; + + if (!NETAPI_IsKnownUser(username)) + return NERR_UserNotFound; + + if (bufptr) *bufptr = NULL; + if (entriesread) *entriesread = 0; + if (totalentries) *totalentries = 0; + + return NERR_Success; } /************************************************************ diff --git a/dlls/netapi32/netapi32.spec b/dlls/netapi32/netapi32.spec index 52be477d50e..65bdba4147f 100644 --- a/dlls/netapi32/netapi32.spec +++ b/dlls/netapi32/netapi32.spec @@ -190,7 +190,7 @@ @ stub NetSessionGetInfo @ stub NetShareAdd @ stub NetShareCheck -@ stub NetShareDel +@ stdcall NetShareDel(wstr wstr long) @ stub NetShareDelSticky @ stdcall NetShareEnum(wstr long ptr long ptr ptr ptr) @ stub NetShareEnumSticky diff --git a/dlls/netapi32/share.c b/dlls/netapi32/share.c index f46c04a02ac..29f4d259ec5 100644 --- a/dlls/netapi32/share.c +++ b/dlls/netapi32/share.c @@ -83,3 +83,12 @@ NET_API_STATUS WINAPI NetShareEnum( LPWSTR servername, DWORD level, LPBYTE* bufp return ERROR_NOT_SUPPORTED; } + +/************************************************************ + * NetShareDel (NETAPI32.@) + */ +NET_API_STATUS WINAPI NetShareDel(LMSTR servername, LMSTR netname, DWORD reserved) +{ + FIXME("Stub (%s %s %d)\n", debugstr_w(servername), debugstr_w(netname), reserved); + return NERR_Success; +} diff --git a/include/lmaccess.h b/include/lmaccess.h index 8e405cedf41..41e18267a4f 100644 --- a/include/lmaccess.h +++ b/include/lmaccess.h @@ -458,6 +458,7 @@ NET_API_STATUS WINAPI NetLocalGroupSetMembers(LPCWSTR,LPCWSTR,DWORD,LPBYTE,DWORD NET_API_STATUS WINAPI NetQueryDisplayInformation(LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPDWORD,PVOID*); NET_API_STATUS WINAPI NetUserAdd(LPCWSTR,DWORD,LPBYTE,LPDWORD); NET_API_STATUS WINAPI NetUserDel(LPCWSTR,LPCWSTR); +NET_API_STATUS WINAPI NetUserGetLocalGroups(LPCWSTR,LPCWSTR,DWORD,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD); NET_API_STATUS WINAPI NetUserEnum(LPCWSTR,DWORD,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD); NET_API_STATUS WINAPI NetUserGetInfo(LPCWSTR,LPCWSTR,DWORD,LPBYTE*); NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR,DWORD,LPBYTE*); diff --git a/include/lmshare.h b/include/lmshare.h index 7f98be450df..082abf2f916 100644 --- a/include/lmshare.h +++ b/include/lmshare.h @@ -32,6 +32,7 @@ typedef struct _SHARE_INFO_1 { LMSTR shi1_remark; } SHARE_INFO_1, *PSHARE_INFO_1, *LPSHARE_INFO_1; +NET_API_STATUS WINAPI NetShareDel(LMSTR servername, LMSTR netname, DWORD reserved); NET_API_STATUS WINAPI NetShareEnum(LMSTR servername, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle);