mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[SAMLIB]
Implement SamQueryDisplayInformation. svn path=/trunk/; revision=59630
This commit is contained in:
parent
c99461dd97
commit
6efdd97682
3 changed files with 99 additions and 1 deletions
|
@ -1409,6 +1409,92 @@ SamOpenUser(IN SAM_HANDLE DomainHandle,
|
|||
}
|
||||
|
||||
|
||||
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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -901,6 +901,18 @@ SamOpenUser(IN SAM_HANDLE DomainHandle,
|
|||
IN ULONG UserId,
|
||||
OUT PSAM_HANDLE UserHandle);
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue