xref: /reactos/sdk/lib/rtl/luid.c (revision 321bcc05)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS system libraries
4  * PURPOSE:         Locally unique identifier (LUID) helper functions
5  * FILE:            lib/rtl/luid.c
6  * PROGRAMER:       Eric Kohl
7  */
8 
9 /* INCLUDES *****************************************************************/
10 
11 #include <rtl.h>
12 
13 #define NDEBUG
14 #include <debug.h>
15 
16 /* FUNCTIONS *****************************************************************/
17 
18 VOID NTAPI
19 RtlCopyLuid(PLUID LuidDest,
20             PLUID LuidSrc)
21 {
22    PAGED_CODE_RTL();
23 
24    LuidDest->LowPart = LuidSrc->LowPart;
25    LuidDest->HighPart = LuidSrc->HighPart;
26 }
27 
28 
29 /*
30  * @implemented
31  */
32 VOID NTAPI
33 RtlCopyLuidAndAttributesArray(ULONG Count,
34                               PLUID_AND_ATTRIBUTES Src,
35                               PLUID_AND_ATTRIBUTES Dest)
36 {
37    ULONG i;
38 
39    PAGED_CODE_RTL();
40 
41    for (i = 0; i < Count; i++)
42    {
43       RtlCopyMemory(&Dest[i],
44                     &Src[i],
45                     sizeof(LUID_AND_ATTRIBUTES));
46    }
47 }
48 
49 
50 #undef RtlEqualLuid
51 /*
52  * @implemented
53  */
54 BOOLEAN NTAPI
55 RtlEqualLuid(PLUID Luid1,
56              PLUID Luid2)
57 {
58    PAGED_CODE_RTL();
59 
60    return (Luid1->LowPart == Luid2->LowPart &&
61            Luid1->HighPart == Luid2->HighPart);
62 }
63 
64 /* EOF */
65