ZwAllocateLocallyUniqueId routine

The ZwAllocateLocallyUniqueId routine allocates a locally unique identifier (LUID).

Syntax


NTSTATUS ZwAllocateLocallyUniqueId(
  _Out_  PLUID LUID
);

Parameters

LUID [out]

Pointer to a caller-allocated buffer to receive a copy of the source LUID structure. The buffer must be at least sizeof(LUID).

Return value

ZwAllocateLocallyUniqueId returns STATUS_SUCCESS if the operation succeeds or the appropriate NTSTATUS value if the operation fails. If the output parameter cannot be written to, the routine returns STATUS_ACCESS_VIOLATION.

Remarks

The allocated LUID is unique to the local system only, and uniqueness is guaranteed only until the system is next restarted.

Note  If the call to the ZwAllocateLocallyUniqueId function occurs in user mode, you should use the name "NtAllocateLocallyUniqueId" instead of "ZwAllocateLocallyUniqueId".

Requirements

Version

Available in Windows Vista and later versions of Windows.

Header

Ntddk.h (include Ntddk.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs, SpNoWait, StorPortStartIo

See also

LUID

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft