Author: ekohl
Date: Sat Aug 3 22:39:58 2013
New Revision: 59630
URL:
http://svn.reactos.org/svn/reactos?rev=59630&view=rev
Log:
[SAMLIB]
Implement SamQueryDisplayInformation.
Modified:
trunk/reactos/dll/win32/samlib/samlib.c
trunk/reactos/dll/win32/samlib/samlib.spec
trunk/reactos/include/ddk/ntsam.h
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 Aug 3 22:39:58 2013
@@ -1411,6 +1411,92 @@
NTSTATUS
NTAPI
+SamQueryDisplayInformation(IN SAM_HANDLE DomainHandle,
+ IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
+ IN ULONG Index,
+ IN ULONG EntryCount,
+ IN ULONG PreferredMaximumLength,
+ OUT PULONG TotalAvailable,
+ OUT PULONG TotalReturned,
+ OUT PULONG ReturnedEntryCount,
+ OUT PVOID *SortedBuffer)
+{
+ SAMPR_DISPLAY_INFO_BUFFER LocalBuffer;
+ NTSTATUS Status;
+
+ TRACE("(%p %lu %lu %lu %lu %p %p %p %p)\n",
+ DomainHandle, DisplayInformation, Index, EntryCount,
+ PreferredMaximumLength, TotalAvailable, TotalReturned,
+ ReturnedEntryCount, SortedBuffer);
+
+ if ((TotalAvailable == NULL) ||
+ (TotalReturned == NULL) ||
+ (ReturnedEntryCount == NULL) ||
+ (SortedBuffer == NULL))
+ return STATUS_INVALID_PARAMETER;
+
+ RpcTryExcept
+ {
+ Status = SamrQueryDisplayInformation3((SAMPR_HANDLE)DomainHandle,
+ DisplayInformation,
+ Index,
+ EntryCount,
+ PreferredMaximumLength,
+ TotalAvailable,
+ TotalReturned,
+ &LocalBuffer);
+ if (NT_SUCCESS(Status))
+ {
+ switch (DisplayInformation)
+ {
+ case DomainDisplayUser:
+ *ReturnedEntryCount = LocalBuffer.UserInformation.EntriesRead;
+ *SortedBuffer = LocalBuffer.UserInformation.Buffer;
+ break;
+
+ case DomainDisplayMachine:
+ *ReturnedEntryCount = LocalBuffer.MachineInformation.EntriesRead;
+ *SortedBuffer = LocalBuffer.MachineInformation.Buffer;
+ break;
+
+ case DomainDisplayGroup:
+ *ReturnedEntryCount = LocalBuffer.GroupInformation.EntriesRead;
+ *SortedBuffer = LocalBuffer.GroupInformation.Buffer;
+ break;
+
+ case DomainDisplayOemUser:
+ *ReturnedEntryCount = LocalBuffer.OemUserInformation.EntriesRead;
+ *SortedBuffer = LocalBuffer.OemUserInformation.Buffer;
+ break;
+
+ case DomainDisplayOemGroup:
+ *ReturnedEntryCount = LocalBuffer.OemGroupInformation.EntriesRead;
+ *SortedBuffer = LocalBuffer.OemGroupInformation.Buffer;
+ break;
+
+ case DomainDisplayServer:
+ /* FIXME */
+ break;
+ }
+ }
+ else
+ {
+ *ReturnedEntryCount = 0;
+ *SortedBuffer = NULL;
+ }
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+ }
+ RpcEndExcept;
+
+ return Status;
+}
+
+
+NTSTATUS
+NTAPI
SamQueryInformationAlias(IN SAM_HANDLE AliasHandle,
IN ALIAS_INFORMATION_CLASS AliasInformationClass,
OUT PVOID *Buffer)
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 Aug 3 22:39:58 2013
@@ -32,7 +32,7 @@
@ stdcall SamOpenDomain(ptr long ptr ptr)
@ stdcall SamOpenGroup(ptr long long ptr)
@ stdcall SamOpenUser(ptr long long ptr)
-@ stub SamQueryDisplayInformation
+@ stdcall SamQueryDisplayInformation(ptr long long long long ptr ptr ptr ptr)
@ stdcall SamQueryInformationAlias(ptr long ptr)
@ stdcall SamQueryInformationDomain(ptr long ptr)
@ stdcall SamQueryInformationGroup(ptr long 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 Aug 3 22:39:58 2013
@@ -903,6 +903,18 @@
NTSTATUS
NTAPI
+SamQueryDisplayInformation(IN SAM_HANDLE DomainHandle,
+ IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
+ IN ULONG Index,
+ IN ULONG EntryCount,
+ IN ULONG PreferredMaximumLength,
+ OUT PULONG TotalAvailable,
+ OUT PULONG TotalReturned,
+ OUT PULONG ReturnedEntryCount,
+ OUT PVOID *SortedBuffer);
+
+NTSTATUS
+NTAPI
SamQueryInformationAlias(IN SAM_HANDLE AliasHandle,
IN ALIAS_INFORMATION_CLASS AliasInformationClass,
OUT PVOID *Buffer);