Author: ekohl
Date: Sat Jul 27 14:06:53 2013
New Revision: 59588
URL:
http://svn.reactos.org/svn/reactos?rev=59588&view=rev
Log:
[SAMLIB]
- Implement SamGetDisplayEnumerationIndex.
- Add DOMAIN_DISPLAY_INFORMATION to ntsam.h and update sam.idl.
Modified:
trunk/reactos/dll/win32/samlib/samlib.c
trunk/reactos/dll/win32/samlib/samlib.spec
trunk/reactos/include/ddk/ntsam.h
trunk/reactos/include/reactos/idl/sam.idl
Modified: trunk/reactos/dll/win32/samlib/samlib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samlib/samlib.c?…
==============================================================================
--- trunk/reactos/dll/win32/samlib/samlib.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samlib/samlib.c [iso-8859-1] Sat Jul 27 14:06:53 2013
@@ -872,6 +872,39 @@
NTSTATUS
NTAPI
+SamGetDisplayEnumerationIndex(IN SAM_HANDLE DomainHandle,
+ IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
+ IN PUNICODE_STRING Prefix,
+ OUT PULONG Index)
+{
+ NTSTATUS Status;
+
+ TRACE("(%p %lu %wZ %p)\n",
+ DomainHandle, DisplayInformation, Prefix, Index);
+
+ if ((Prefix == NULL) ||
+ (Index == NULL))
+ return STATUS_INVALID_PARAMETER;
+
+ RpcTryExcept
+ {
+ Status = SamrGetDisplayEnumerationIndex2((SAMPR_HANDLE)DomainHandle,
+ DisplayInformation,
+ (PRPC_UNICODE_STRING)Prefix,
+ Index);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return Status;
+}
+
+
+NTSTATUS
+NTAPI
SamGetGroupsForUser(IN SAM_HANDLE UserHandle,
OUT PGROUP_MEMBERSHIP *Groups,
OUT PULONG MembershipCount)
Modified: trunk/reactos/dll/win32/samlib/samlib.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samlib/samlib.sp…
==============================================================================
--- trunk/reactos/dll/win32/samlib/samlib.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samlib/samlib.spec [iso-8859-1] Sat Jul 27 14:06:53 2013
@@ -21,7 +21,7 @@
@ stdcall SamFreeMemory(ptr)
@ stdcall SamGetAliasMembership(ptr long ptr ptr ptr)
@ stdcall SamGetCompatibilityMode(ptr ptr)
-@ stub SamGetDisplayEnumerationIndex
+@ stdcall SamGetDisplayEnumerationIndex(ptr long ptr ptr)
@ stdcall SamGetGroupsForUser(ptr ptr ptr)
@ stdcall SamGetMembersInAlias(ptr ptr ptr)
@ stdcall SamGetMembersInGroup(ptr ptr ptr ptr)
Modified: trunk/reactos/include/ddk/ntsam.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntsam.h?rev=59…
==============================================================================
--- trunk/reactos/include/ddk/ntsam.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntsam.h [iso-8859-1] Sat Jul 27 14:06:53 2013
@@ -298,6 +298,15 @@
UNICODE_STRING AdminComment;
} ALIAS_ADM_COMMENT_INFORMATION, *PALIAS_ADM_COMMENT_INFORMATION;
+typedef enum _DOMAIN_DISPLAY_INFORMATION
+{
+ DomainDisplayUser = 1,
+ DomainDisplayMachine,
+ DomainDisplayGroup,
+ DomainDisplayOemUser,
+ DomainDisplayOemGroup,
+ DomainDisplayServer
+} DOMAIN_DISPLAY_INFORMATION, *PDOMAIN_DISPLAY_INFORMATION;
typedef enum _DOMAIN_INFORMATION_CLASS
{
@@ -818,6 +827,13 @@
NTSTATUS
NTAPI
+SamGetDisplayEnumerationIndex(IN SAM_HANDLE DomainHandle,
+ IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
+ IN PUNICODE_STRING Prefix,
+ OUT PULONG Index);
+
+NTSTATUS
+NTAPI
SamGetGroupsForUser(IN SAM_HANDLE UserHandle,
OUT PGROUP_MEMBERSHIP *Groups,
OUT PULONG MembershipCount);
Modified: trunk/reactos/include/reactos/idl/sam.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/sam.id…
==============================================================================
--- trunk/reactos/include/reactos/idl/sam.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/sam.idl [iso-8859-1] Sat Jul 27 14:06:53 2013
@@ -275,14 +275,17 @@
[case(DomainModifiedInformation2)] DOMAIN_MODIFIED_INFORMATION2 Modified2;
} SAMPR_DOMAIN_INFO_BUFFER, *PSAMPR_DOMAIN_INFO_BUFFER;
+cpp_quote("#ifndef _NTSAM_")
typedef enum _DOMAIN_DISPLAY_INFORMATION
{
DomainDisplayUser = 1,
DomainDisplayMachine,
DomainDisplayGroup,
DomainDisplayOemUser,
- DomainDisplayOemGroup
+ DomainDisplayOemGroup,
+ DomainDisplayServer
} DOMAIN_DISPLAY_INFORMATION, *PDOMAIN_DISPLAY_INFORMATION;
+cpp_quote("#endif")
typedef struct _SAMPR_DOMAIN_DISPLAY_USER
{