Index: local_group.c =================================================================== --- local_group.c (revision 71099) +++ local_group.c (working copy) @@ -1,9 +1,7 @@ /* - * Copyright 2006 Robert Reif - * - * netapi32 local group functions - * - * This library is free software; you can redistribute it and/or + * COPYRIGHT: + *Copyright 2006 + *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. @@ -16,6 +14,11 @@ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * PROJECT: ReactOS net command + * FILE: reactos/dll/win32/netapi32/local_group.c + * PURPOSE: netapi32 local group functions + * + * PROGRAMMERS: Robert Reif, Curtis Wilson */ #include "netapi32.h" @@ -103,7 +106,7 @@ case 0: LocalInfo0 = (PLOCALGROUP_INFO_0)LocalBuffer; - Ptr = (LPWSTR)LocalInfo0++; + Ptr = (LPWSTR)((ULONG_PTR)LocalInfo0 + sizeof(LOCALGROUP_INFO_0)); LocalInfo0->lgrpi0_name = Ptr; memcpy(LocalInfo0->lgrpi0_name, @@ -1063,6 +1066,12 @@ (PVOID *)&EnumContext->Buffer, prefmaxlen, &EnumContext->Returned); + if(Status == STATUS_NO_MORE_ENTRIES) // if no entries were found return a success and set the phase to Done so we can do a cleanup + { + Status = NERR_Success; + EnumContext->Phase = DonePhase; + goto done; + } TRACE("SamEnumerateAliasesInDomain returned (Status %08lx)\n", Status); if (!NT_SUCCESS(Status))