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