ReactOS  0.4.13-dev-257-gfabbd7c
uuid.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: ntoskrnl/ex/uuid.c
5  * PURPOSE: UUID generator
6  * PROGRAMMERS: Eric Kohl
7  * Thomas Weidenmueller
8  * Pierre Schweitzer
9  */
10 
11 /* INCLUDES *****************************************************************/
12 
13 #include <ntoskrnl.h>
14 #define NDEBUG
15 #include <debug.h>
16 
17 #define SEED_BUFFER_SIZE 6
18 
19 /* Number of 100ns ticks per clock tick. To be safe, assume that the clock
20  resolution is at least 1000 * 100 * (1/1000000) = 1/10 of a second */
21 #define TICKS_PER_CLOCK_TICK 1000
22 #define SECSPERDAY 86400
23 #define TICKSPERSEC 10000000
24 
25 /* UUID system time starts at October 15, 1582 */
26 #define SECS_15_OCT_1582_TO_1601 ((17 + 30 + 31 + 365 * 18 + 5) * SECSPERDAY)
27 #define TICKS_15_OCT_1582_TO_1601 ((ULONGLONG)SECS_15_OCT_1582_TO_1601 * TICKSPERSEC)
28 
29 /* 10000 in 100-ns model = 0.1 microsecond */
30 #define TIME_FRAME 10000
31 
32 #if defined (ALLOC_PRAGMA)
33 #pragma alloc_text(INIT, ExpUuidInitialization)
34 #pragma alloc_text(INIT, ExLuidInitialization)
35 #endif
36 
37 
38 /* GLOBALS ****************************************************************/
39 
45 UUID_CACHED_VALUES_STRUCT ExpUuidCachedValues = {0ULL, 0xFFFFFFFF, 0, 0, { 0x80, 0x6E, 0x6F, 0x6E, 0x69, 0x63}};
48 LARGE_INTEGER ExpLuid = {{0x3e9, 0x0}};
49 
50 /* FUNCTIONS ****************************************************************/
51 
52 /*
53  * @implemented
54  */
55 BOOLEAN
56 INIT_FUNCTION
57 NTAPI
59 {
61 
64 
65  return TRUE;
66 }
67 
68 
69 /*
70  * @implemented
71  */
72 #define VALUE_BUFFER_SIZE 20
73 static NTSTATUS
75 {
76  UCHAR ValueBuffer[VALUE_BUFFER_SIZE];
83 
84  PAGED_CODE();
85 
86  RtlInitUnicodeString(&KeyName, L"\\Registry\\Machine\\Software\\Microsoft\\Rpc");
87  RtlInitUnicodeString(&ValueName, L"UuidSequenceNumber");
88 
90  &KeyName,
92  NULL,
93  NULL);
95  if (!NT_SUCCESS(Status))
96  {
97  DPRINT("ZwOpenKey() failed (Status %lx)\n", Status);
98  return Status;
99  }
100 
101  ValueInfo = (PKEY_VALUE_PARTIAL_INFORMATION)ValueBuffer;
102  Status = ZwQueryValueKey(KeyHandle,
103  &ValueName,
105  ValueBuffer,
107  &ValueLength);
109  if (!NT_SUCCESS(Status))
110  {
111  DPRINT("ZwQueryValueKey() failed (Status %lx)\n", Status);
112  return Status;
113  }
114 
115  if (ValueInfo->Type != REG_DWORD || ValueInfo->DataLength != sizeof(DWORD))
116  {
117  return STATUS_UNSUCCESSFUL;
118  }
119 
120  *Sequence = *((PULONG)ValueInfo->Data);
121 
122  DPRINT("Loaded sequence %lx\n", *Sequence);
123 
124  return STATUS_SUCCESS;
125 }
126 #undef VALUE_BUFFER_SIZE
127 
128 /*
129  * @implemented
130  */
131 static NTSTATUS
133 {
138 
139  PAGED_CODE();
140 
141  RtlInitUnicodeString(&KeyName, L"\\Registry\\Machine\\Software\\Microsoft\\Rpc");
142  RtlInitUnicodeString(&ValueName, L"UuidSequenceNumber");
143 
145  &KeyName,
147  NULL,
148  NULL);
149  Status = ZwOpenKey(&KeyHandle,
152  if (!NT_SUCCESS(Status))
153  {
154  DPRINT("ZwOpenKey() failed (Status %lx)\n", Status);
155  return Status;
156  }
157 
158  Status = ZwSetValueKey(KeyHandle,
159  &ValueName,
160  0,
161  REG_DWORD,
162  Sequence,
163  sizeof(ULONG));
165  if (!NT_SUCCESS(Status))
166  {
167  DPRINT("ZwSetValueKey() failed (Status %lx)\n", Status);
168  }
169 
170  return Status;
171 }
172 
173 /*
174  * @implemented
175  * Warning! This function must be called
176  * with ExpUuidLock held!
177  */
178 static VOID
180 {
182 
183  PAGED_CODE();
184 
185  /* Only save sequence if it has to */
187  {
189  if (NT_SUCCESS(Status))
190  {
192  }
193  }
194 }
195 
196 /*
197  * @implemented
198  * Warning! This function must be called
199  * with ExpUuidLock held!
200  */
201 static NTSTATUS
203  PULONG Range,
204  PULONG Sequence)
205 {
207  LARGE_INTEGER Counter, Frequency, CurrentTime, TimeDiff, ClockDiff;
208 
209  PAGED_CODE();
210 
211  /* Initialize sequence number */
213  {
214  /* Try to load sequence number */
216  if (NT_SUCCESS(Status))
217  {
219  }
220  else
221  {
222  /* If we cannot, generate a "true" random */
225  }
226 
227  /* It's valid and to be saved */
230  }
231 
232  KeQuerySystemTime(&CurrentTime);
233  TimeDiff.QuadPart = CurrentTime.QuadPart - ExpUuidLastTimeAllocated.QuadPart;
234  /* If time went backwards, change sequence (see RFC example) */
235  if (TimeDiff.QuadPart < 0)
236  {
238  TimeDiff.QuadPart = 2 * TIME_FRAME;
239 
240  /* It's to be saved */
243  }
244 
245  if (TimeDiff.QuadPart == 0)
246  {
247  return STATUS_RETRY;
248  }
249 
250  /* If time diff > 0.1ms, squash it to reduce it to keep our clock resolution */
251  if (TimeDiff.HighPart > 0 || TimeDiff.QuadPart > TICKS_PER_CLOCK_TICK * TIME_FRAME)
252  {
254  }
255 
256  if (TimeDiff.HighPart < 0 || TimeDiff.QuadPart <= TIME_FRAME)
257  {
258  *Range = TimeDiff.QuadPart;
259  ClockDiff.QuadPart = 0LL;
260  }
261  else
262  {
263  *Range = TIME_FRAME;
264  ClockDiff.QuadPart = TimeDiff.QuadPart - TIME_FRAME;
265  --ClockDiff.HighPart;
266  }
267 
268  Time->QuadPart = CurrentTime.QuadPart - *Range - ClockDiff.QuadPart;
269  ExpUuidLastTimeAllocated.QuadPart = CurrentTime.QuadPart - ClockDiff.QuadPart;
270  *Sequence = ExpUuidSequenceNumber;
271 
272  return STATUS_SUCCESS;
273 }
274 
275 /*
276  * @implemented
277  * Warning! This function must be called
278  * with ExpUuidLock held!
279  */
280 static NTSTATUS
282 {
285  ULONG Range;
286  ULONG Sequence;
287 
288  PAGED_CODE();
289 
290  /* Allocate UUIDs */
291  Status = ExpAllocateUuids(&Time, &Range, &Sequence);
292  if (Status == STATUS_RETRY)
293  {
294  return Status;
295  }
296 
297  if (!NT_SUCCESS(Status))
298  {
299  return STATUS_NO_MEMORY;
300  }
301 
302  /* We need at least one UUID */
303  ASSERT(Range != 0);
304 
305  /* Set up our internal cache
306  * See format_uuid_v1 in RFC4122 for magic values
307  */
308  CachedValues->ClockSeqLow = Sequence;
309  CachedValues->ClockSeqHiAndReserved = (Sequence & 0x3F00) >> 8;
310  CachedValues->ClockSeqHiAndReserved |= 0x80;
311  CachedValues->AllocatedCount = Range;
312 
313  /*
314  * Time is relative to UUID time
315  * And we set last time range for all the possibly
316  * returnable UUID
317  */
319  CachedValues->Time = Time.QuadPart + (Range - 1);
320 
321  return STATUS_SUCCESS;
322 }
323 
324 /*
325  * @implemented
326  */
327 BOOLEAN
328 INIT_FUNCTION
329 NTAPI
331 {
332  return TRUE;
333 }
334 
335 /*
336  * @implemented
337  */
338 VOID
339 NTAPI
341 {
342  LARGE_INTEGER PrevLuid;
343  LONGLONG NewLuid, CompLuid;
344 
345  /* Atomically increment the luid */
346  PrevLuid.QuadPart = ExpLuid.QuadPart;
347  for (NewLuid = ExpLuid.QuadPart + ExpLuidIncrement; ;
348  NewLuid = PrevLuid.QuadPart + ExpLuidIncrement)
349  {
351  NewLuid,
352  PrevLuid.QuadPart);
353  if (CompLuid == PrevLuid.QuadPart)
354  {
355  break;
356  }
357 
358  PrevLuid.QuadPart = CompLuid;
359  }
360 
361  LocallyUniqueId->LowPart = PrevLuid.LowPart;
362  LocallyUniqueId->HighPart = PrevLuid.HighPart;
363 }
364 
365 
366 /*
367  * @implemented
368  */
369 NTSTATUS
370 NTAPI
372 {
374  PAGED_CODE();
375 
376  /* Probe if user mode */
378  if (PreviousMode != KernelMode)
379  {
380  _SEH2_TRY
381  {
382  ProbeForWrite(LocallyUniqueId,
383  sizeof(LUID),
384  sizeof(ULONG));
385  }
387  {
389  }
390  _SEH2_END;
391  }
392 
393  /* Do the allocation */
394  ExAllocateLocallyUniqueId(LocallyUniqueId);
395  return STATUS_SUCCESS;
396 }
397 
398 /*
399  * @implemented
400  */
401 NTSTATUS
402 NTAPI
404 {
406  LONG AllocatedCount;
408  BOOLEAN Valid;
409 
410  PAGED_CODE();
411 
413  /* Loop until we have an UUID to return */
414  while (TRUE)
415  {
416  /* Try to gather node values */
417  do
418  {
420 
421  RtlCopyMemory(&Uuid->Data4[0],
424  Valid = ExpUuidCacheValid;
426  }
427  /* Loop till we can do it without being disturbed */
429 
430  /* We have more than an allocated UUID left, that's OK to return! */
431  if (AllocatedCount >= 0)
432  {
433  break;
434  }
435 
436  /*
437  * Here, we're out of UUIDs, we need to allocate more
438  * We need to be alone to do it, so lock the mutex
439  */
442  {
443  /* If allocation fails, bail out! */
445  if (Status != STATUS_SUCCESS)
446  {
448  return Status;
449  }
450 
451  /* Save our current sequence if changed */
453  }
455  }
456 
457  /*
458  * Once here, we've got an UUID to return
459  * But, if our init wasn't sane, then, make
460  * sure it's only used locally
461  */
462  if (!Valid)
463  {
465  }
466 
467  /* Set our timestamp - see RFC4211 */
468  Time.QuadPart -= AllocatedCount;
469  Uuid->Data1 = Time.LowPart;
470  Uuid->Data2 = Time.HighPart;
471  /* We also set the bit for GUIDv1 */
472  Uuid->Data3 = ((Time.HighPart >> 16) & 0x0FFF) | 0x1000;
473 
474  return Status;
475 }
476 
477 /*
478  * @implemented
479  */
480 NTSTATUS
481 NTAPI
483  OUT PULONG Range,
484  OUT PULONG Sequence,
485  OUT PUCHAR Seed)
486 {
487  ULARGE_INTEGER IntTime;
488  ULONG IntRange, IntSequence;
491 
492  PAGED_CODE();
493 
494  /* Probe if user mode */
496  if (PreviousMode != KernelMode)
497  {
498  _SEH2_TRY
499  {
501  sizeof(ULARGE_INTEGER),
502  sizeof(ULONG));
503 
505  sizeof(ULONG),
506  sizeof(ULONG));
507 
508  ProbeForWrite(Sequence,
509  sizeof(ULONG),
510  sizeof(ULONG));
511 
512  ProbeForWrite(Seed,
514  sizeof(UCHAR));
515  }
517  {
519  }
520  _SEH2_END;
521  }
522 
523  /* During allocation we must be alone */
525 
526  Status = ExpAllocateUuids(&IntTime,
527  &IntRange,
528  &IntSequence);
529  if (!NT_SUCCESS(Status))
530  {
532  return Status;
533  }
534 
535  /* If sequence number was changed, save it */
537 
538  /* Allocation done, so we can release */
540 
541  /* Write back UUIDs to caller */
542  _SEH2_TRY
543  {
544  Time->QuadPart = IntTime.QuadPart;
545  *Range = IntRange;
546  *Sequence = IntSequence;
547 
548  RtlCopyMemory(Seed,
551 
553  }
555  {
557  }
558  _SEH2_END;
559 
560  return Status;
561 }
562 
563 
564 /*
565  * @implemented
566  */
567 NTSTATUS
568 NTAPI
570 {
572  BOOLEAN GotContext;
575  LUID CallerLuid, SystemLuid = SYSTEM_LUID;
576 
577  PAGED_CODE();
578 
579  /* Should only be done by umode */
581 
582  /* No context to release */
583  GotContext = FALSE;
584  _SEH2_TRY
585  {
586  /* Get our caller context and remember to release it */
588  GotContext = TRUE;
589 
590  /* Get caller access token and its associated ID */
592  Status = SeQueryAuthenticationIdToken(Token, &CallerLuid);
593  if (!NT_SUCCESS(Status))
594  {
596  }
597 
598  /* This call is only allowed for SYSTEM */
599  if (!RtlEqualLuid(&CallerLuid, &SystemLuid))
600  {
602  }
603 
604  /* Check for buffer validity and then copy it to our seed */
605  ProbeForRead(Seed, SEED_BUFFER_SIZE, sizeof(UCHAR));
607 
608  /*
609  * According to RFC 4122, UUID seed is based on MAC addresses
610  * If it is randomly set, then, it must have its multicast be set
611  * to be valid and avoid collisions
612  * Reflect it here
613  */
614  ExpUuidCacheValid = ~(*Seed >> 7) & 1;
615 
617  }
619  {
621  }
622  _SEH2_END;
623 
624  /* Release context if required */
625  if (GotContext)
626  {
628  }
629 
630  return Status;
631 }
632 
633 /* EOF */
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
VOID NTAPI SeCaptureSubjectContext(OUT PSECURITY_SUBJECT_CONTEXT SubjectContext)
Definition: access.c:301
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
#define IN
Definition: typedefs.h:38
DECLSPEC_NORETURN NTSYSAPI VOID NTAPI RtlRaiseStatus(_In_ NTSTATUS Status)
_Inout_ PLIST_ENTRY _In_ PVOID _In_ PSTRING _In_ BOOLEAN _In_ BOOLEAN _In_ ULONG _In_ PFLT_CALLBACK_DATA _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext
Definition: fltkernel.h:2239
VOID NTAPI SeReleaseSubjectContext(IN PSECURITY_SUBJECT_CONTEXT SubjectContext)
Definition: access.c:360
LARGE_INTEGER NTAPI KeQueryPerformanceCounter(IN PLARGE_INTEGER PerformanceFreq)
Definition: timer.c:138
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define LL
Definition: tui.h:72
#define VALUE_BUFFER_SIZE
Definition: uuid.c:72
#define InterlockedCompareExchange64
Definition: interlocked.h:114
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4711
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
unsigned char * PUCHAR
Definition: retypes.h:3
#define KeGetPreviousMode()
Definition: ketypes.h:1081
LONG NTSTATUS
Definition: precomp.h:26
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE Token
KPROCESSOR_MODE NTAPI ExGetPreviousMode(VOID)
Definition: sysinfo.c:2982
BOOLEAN ExpUuidCacheValid
Definition: uuid.c:46
BOOLEAN INIT_FUNCTION NTAPI ExLuidInitialization(VOID)
Definition: uuid.c:330
NTSTATUS NTAPI NtAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId)
Definition: uuid.c:371
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
#define PAGED_CODE()
Definition: video.h:57
FAST_MUTEX ExpUuidLock
Definition: uuid.c:40
_SEH2_TRY
Definition: create.c:4250
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct tagRange Range
NTSTATUS NTAPI SeQueryAuthenticationIdToken(IN PACCESS_TOKEN Token, OUT PLUID LogonId)
Definition: token.c:1752
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define RtlEqualLuid(Luid1, Luid2)
Definition: rtlfuncs.h:301
long LONG
Definition: pedump.c:60
#define GENERIC_WRITE
Definition: nt_native.h:90
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
LARGE_INTEGER ExpUuidLastTimeAllocated
Definition: uuid.c:41
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
static VOID ExpUuidSaveSequenceNumberIf(VOID)
Definition: uuid.c:179
static NTSTATUS ExpUuidSaveSequenceNumber(PULONG Sequence)
Definition: uuid.c:132
#define TIME_FRAME
Definition: uuid.c:30
#define ULL(a, b)
Definition: format_msg.c:27
#define TICKS_15_OCT_1582_TO_1601
Definition: uuid.c:27
FAST_MUTEX
Definition: extypes.h:17
LARGE_INTEGER ExpLuid
Definition: uuid.c:48
int64_t LONGLONG
Definition: typedefs.h:66
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
BOOLEAN INIT_FUNCTION NTAPI ExpUuidInitialization(VOID)
Definition: uuid.c:58
#define _SEH2_YIELD(STMT_)
Definition: pseh2_64.h:8
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ULONG ExpUuidSequenceNumber
Definition: uuid.c:42
static NTSTATUS ExpUuidGetValues(PUUID_CACHED_VALUES_STRUCT CachedValues)
Definition: uuid.c:281
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
unsigned long DWORD
Definition: ntddk_ex.h:95
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
unsigned char UCHAR
Definition: xmlstorage.h:181
NTSTATUS NTAPI NtSetUuidSeed(IN PUCHAR Seed)
Definition: uuid.c:569
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
static const WCHAR L[]
Definition: oid.c:1250
#define InterlockedDecrement
Definition: armddk.h:52
_In_ GUID _In_ PVOID _In_ ULONG ValueLength
Definition: hubbusif.h:311
ULONG LowPart
Definition: typedefs.h:104
#define GENERIC_READ
Definition: compat.h:124
Definition: range.c:43
#define SeQuerySubjectContextToken(SubjectContext)
Definition: sefuncs.h:583
#define SYSTEM_LUID
Definition: setypes.h:672
Status
Definition: gdiplustypes.h:24
_SEH2_END
Definition: create.c:4424
#define TICKS_PER_CLOCK_TICK
Definition: uuid.c:21
LONG NTAPI ExSystemExceptionFilter(VOID)
Definition: harderr.c:351
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
BOOLEAN ExpUuidSequenceNumberNotSaved
Definition: uuid.c:44
VOID NTAPI ExAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId)
Definition: uuid.c:340
static NTSTATUS ExpAllocateUuids(PULARGE_INTEGER Time, PULONG Range, PULONG Sequence)
Definition: uuid.c:202
UUID_CACHED_VALUES_STRUCT ExpUuidCachedValues
Definition: uuid.c:45
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
unsigned int * PULONG
Definition: retypes.h:1
static LARGE_INTEGER Frequency
Definition: clock.c:41
static LARGE_INTEGER Counter
Definition: clock.c:43
#define STATUS_RETRY
Definition: udferr_usr.h:182
static NTSTATUS ExpUuidLoadSequenceNumber(PULONG Sequence)
Definition: uuid.c:74
NTSTATUS NTAPI NtAllocateUuids(OUT PULARGE_INTEGER Time, OUT PULONG Range, OUT PULONG Sequence, OUT PUCHAR Seed)
Definition: uuid.c:482
#define OUT
Definition: typedefs.h:39
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define ULONG_PTR
Definition: config.h:101
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
BOOLEAN ExpUuidSequenceNumberValid
Definition: uuid.c:43
UCHAR ClockSeqHiAndReserved
Definition: ex.h:174
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
return STATUS_SUCCESS
Definition: btrfs.c:2745
#define REG_DWORD
Definition: sdbapi.c:596
#define SEED_BUFFER_SIZE
Definition: uuid.c:17
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
NTSTATUS NTAPI ExUuidCreate(OUT UUID *Uuid)
Definition: uuid.c:403
static PLARGE_INTEGER Time
Definition: time.c:105
#define RPC_NT_UUID_LOCAL_ONLY
Definition: ntstatus.h:162
LONGLONG QuadPart
Definition: typedefs.h:112
ULONG ExpLuidIncrement
Definition: uuid.c:47