NtAllocateLocallyUniqueId - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

//
// LUIDs
//

NTSYSCALLAPI
NTSTATUS
NTAPI
NtAllocateLocallyUniqueId(
    _Out_ PLUID Luid
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwAllocateLocallyUniqueId(
    _Out_ PLUID Luid
    );

#endif

View code on GitHub
// ntddk.h

NTSYSAPI NTSTATUS ZwAllocateLocallyUniqueId(
  PLUID Luid
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddk-zwallocatelocallyuniqueid)

Description

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

Parameters

Luid

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.

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

For calls from kernel-mode drivers, the Nt*Xxx* and Zw*Xxx* versions of a Windows Native System Services routine can behave differently in the way that they handle and interpret input parameters. For more information about the relationship between the Nt*Xxx* and Zw*Xxx* versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.

See also

LUID

Using Nt and Zw Versions of the Native System Services Routines


NTinternals.net (undocumented.ntinternals.net)

This function is documented in Windows Driver Kit.


Function allocates LUID (Locally Unique Identifier) for future use.

LocallyUniqueId

Pointer to LUID structure receiving new locally unique identifier.

Documented by

See also